bcachefs/drivers/pci
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
..
controller Merge branch 'pci/typos' 2024-11-25 13:41:00 -06:00
endpoint
hotplug Merge branch 'pci/misc' 2024-11-25 13:41:00 -06:00
msi
pcie module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
pwrctrl pci-v6.13-changes 2024-11-26 18:05:44 -08:00
switch
access.c
ats.c
bus.c Merge branch 'pci/pwrctl' 2024-11-25 13:40:54 -06:00
devres.c
doe.c
ecam.c
host-bridge.c
iomap.c
iov.c
irq.c
Kconfig Merge branch 'pci/tph' 2024-11-25 13:40:55 -06:00
Makefile Merge branch 'pci/tph' 2024-11-25 13:40:55 -06:00
mmap.c
npem.c
of_property.c
of.c PCI/pwrctl: Create pwrctl device only if at least one power supply is present 2024-11-21 16:01:04 +00:00
p2pdma.c
pci-acpi.c
pci-bridge-emul.c
pci-bridge-emul.h
pci-driver.c
pci-label.c
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c Driver core changes for 6.13-rc1 2024-11-29 11:43:29 -08:00
pci.c pci-v6.13-changes 2024-11-26 18:05:44 -08:00
pci.h Merge branch 'pci/tph' 2024-11-25 13:40:55 -06:00
probe.c pci-v6.13-changes 2024-11-26 18:05:44 -08:00
proc.c
quirks.c pci-v6.13-changes 2024-11-26 18:05:44 -08:00
remove.c PCI/pwrctrl: Unregister platform device only if one actually exists 2024-11-30 11:41:25 -06:00
rom.c
search.c
setup-bus.c
setup-res.c
slot.c Merge branch 'pci/misc' 2024-11-25 13:41:00 -06:00
syscall.c
tph.c
vc.c
vgaarb.c
vpd.c
xen-pcifront.c