linux-stable/drivers/tty/serial/8250
Peter Zijlstra cdd30ebb1b module: Convert symbol namespace to string literal
Clean up the existing export namespace code along the same lines of
commit 33def8498f ("treewide: Convert macro and uses of __section(foo)
to __section("foo")") and for the same reason, it is not desired for the
namespace argument to be a macro expansion itself.

Scripted using

  git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file;
  do
    awk -i inplace '
      /^#define EXPORT_SYMBOL_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /^#define MODULE_IMPORT_NS/ {
        gsub(/__stringify\(ns\)/, "ns");
        print;
        next;
      }
      /MODULE_IMPORT_NS/ {
        $0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g");
      }
      /EXPORT_SYMBOL_NS/ {
        if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) {
  	if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ &&
  	    $0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ &&
  	    $0 !~ /^my/) {
  	  getline line;
  	  gsub(/[[:space:]]*\\$/, "");
  	  gsub(/[[:space:]]/, "", line);
  	  $0 = $0 " " line;
  	}

  	$0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/,
  		    "\\1(\\2, \"\\3\")", "g");
        }
      }
      { print }' $file;
  done

Requested-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc
Acked-by: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-12-02 11:34:44 -08:00
..
8250_accent.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_acorn.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_aspeed_vuart.c serial: Switch back to struct platform_driver::remove() 2024-10-11 08:13:28 +02:00
8250_bcm2835aux.c serial: Switch back to struct platform_driver::remove() 2024-10-11 08:13:28 +02:00
8250_bcm7271.c serial: 8250: Fix typos in comments across various files 2024-10-11 08:14:50 +02:00
8250_boca.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_core.c serial: core: Introduce wrapper to set @uart_port->cons 2024-08-21 14:56:23 +02:00
8250_dfl.c tty: serial: 8250: add DFL bus driver for Altera 16550. 2023-01-19 16:07:40 +01:00
8250_dma.c tty: serial: 8250_dma: use sgl with 2 nents to take care of buffer wrap 2024-07-31 12:32:30 +02:00
8250_dw.c serial: 8250_dw: Add Sophgo SG2044 quirk 2024-11-04 02:02:21 +01:00
8250_dwlib.c serial: remove quot_frac from serial8250_do_set_divisor() 2024-08-07 13:13:35 +02:00
8250_dwlib.h serial: 8250_dw: Revert "Move definitions to the shared header" 2024-06-04 14:07:58 +02:00
8250_early.c tty: serial: handle HAS_IOPORT dependencies 2024-10-28 21:44:28 +00:00
8250_em.c serial: Switch back to struct platform_driver::remove() 2024-10-11 08:13:28 +02:00
8250_exar_st16c554.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_exar.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
8250_fintek.c serial: 8250_fintek: Add support for F81216E 2024-11-12 13:05:38 +01:00
8250_fourport.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_fsl.c serial: Switch back to struct platform_driver::remove() 2024-10-11 08:13:28 +02:00
8250_hp300.c tty: add SPDX identifiers to all remaining files in drivers/tty/ 2017-11-08 13:08:12 +01:00
8250_hub6.c tty: serial: Remove redundant license text 2017-11-08 13:08:12 +01:00
8250_ingenic.c serial: Switch back to struct platform_driver::remove() 2024-10-11 08:13:28 +02:00
8250_ioc3.c serial: Switch back to struct platform_driver::remove() 2024-10-11 08:13:28 +02:00
8250_lpc18xx.c serial: Switch back to struct platform_driver::remove() 2024-10-11 08:13:28 +02:00
8250_lpss.c serial: 8250_lpss: copy dma_param using devm_kmemdup() 2024-01-04 16:21:51 +01:00
8250_men_mcb.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
8250_mid.c serial: 8250_mid: Remove 8250_pci usage 2023-09-18 11:14:43 +02:00
8250_mtk.c serial: 8250: Fix typos in comments across various files 2024-10-11 08:14:50 +02:00
8250_of.c serial: Switch back to struct platform_driver::remove() 2024-10-11 08:13:28 +02:00
8250_omap.c serial: 8250: omap: Move pm_runtime_get_sync 2024-11-05 14:03:53 +01:00
8250_parisc.c tty: add missing MODULE_DESCRIPTION() macros 2024-06-24 16:10:11 +02:00
8250_pci1xxxx.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
8250_pci.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
8250_pcilib.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
8250_pcilib.h tty: serial: handle HAS_IOPORT dependencies 2024-10-28 21:44:28 +00:00
8250_pericom.c serial: 8250_pericom: Use UART_LCR_DLAB 2022-06-27 14:33:15 +02:00
8250_platform.c serial: Switch back to struct platform_driver::remove() 2024-10-11 08:13:28 +02:00
8250_pnp.c serial: 8250_pnp: Simplify "line" related code 2024-05-10 11:49:12 +01:00
8250_port.c asm-generic updates for 6.13 2024-11-20 15:13:02 -08:00
8250_pxa.c serial: Switch back to struct platform_driver::remove() 2024-10-11 08:13:28 +02:00
8250_rsa.c serial: 8250: Extract RSA bits 2024-06-04 14:01:50 +02:00
8250_rt288x.c serial: 8250_rt288x: Remove unnecessary UART_REG_UNMAPPED 2023-05-13 19:47:26 +09:00
8250_tegra.c serial: Switch back to struct platform_driver::remove() 2024-10-11 08:13:28 +02:00
8250_uniphier.c serial: Switch back to struct platform_driver::remove() 2024-10-11 08:13:28 +02:00
8250.h serial: 8250: Extract platform driver 2024-06-04 14:01:50 +02:00
Kconfig TTY / Serial driver updates for 6.13-rc1 2024-11-30 09:03:16 -08:00
Makefile serial: 8250: Extract platform driver 2024-06-04 14:01:50 +02:00
serial_cs.c tty: add missing MODULE_DESCRIPTION() macros 2024-06-24 16:10:11 +02:00