linux/drivers/misc
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
..
altera-stapl
bcm-vk
c2port
cardreader
cb710
cxl Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
echo
eeprom TTY / Serial driver updates for 6.13-rc1 2024-11-30 09:03:16 -08:00
genwqe
ibmasm
keba
lis3lv02d
lkdtm
mchp_pci1xxxx
mei module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
ocxl
pvpanic
sgi-gru
sgi-xp
uacce
vmw_vmci
Kconfig Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
Makefile Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
ad525x_dpot-i2c.c
ad525x_dpot-spi.c
ad525x_dpot.c
ad525x_dpot.h
apds990x.c
apds9802als.c
atmel-ssc.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
bh1770glc.c
cs5535-mfgpt.c
ds1682.c
dummy-irq.c
dw-xdata-pcie.c
enclosure.c
fastrpc.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
gehc-achc.c
hi6421v600-irq.c
hisi_hikey_usb.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
hmc6352.c
hpilo.c
hpilo.h
ibmvmc.c
ibmvmc.h
ics932s401.c
isl29003.c
isl29020.c
kgdbts.c
lan966x_pci.c
lan966x_pci.dtso
lattice-ecp3-config.c
mrvl_cn10k_dpi.c
nsm.c
ntsync.c
open-dice.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
pch_phub.c
pci_endpoint_test.c
phantom.c
qcom-coincell.c
rpmb-core.c
smpro-errmon.c
smpro-misc.c
sram-exec.c
sram.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
sram.h
tifm_7xx1.c
tifm_core.c
tps6594-esm.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
tps6594-pfsm.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
tsl2550.c
vcpu_stall_detector.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
vmw_balloon.c
xilinx_sdfec.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
xilinx_tmr_inject.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
xilinx_tmr_manager.c