linux-next/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 PCI: endpoint: Clear secondary (not primary) EPC in pci_epc_remove_epf() 2024-11-18 17:18:19 +00:00
hotplug Merge branch 'pci/misc' 2024-11-25 13:41:00 -06:00
msi Switch ARM/ARM64 over to the modern per device MSI domains: 2024-07-22 14:02:19 -07:00
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 PCI: switchtec: Make switchtec_class constant 2024-06-10 15:03:30 -05:00
access.c PCI: Revert the cfg_access_lock lockdep mechanism 2024-06-04 12:10:05 -05:00
ats.c pci-v6.12-changes 2024-09-23 12:47:06 -07:00
bus.c Merge branch 'pci/pwrctl' 2024-11-25 13:40:54 -06:00
devres.c PCI: Deprecate pcim_iounmap_regions() 2024-11-07 07:10:02 -06:00
doe.c PCI/DOE: Poll DOE Busy bit for up to 1 second in pci_doe_send_req() 2024-10-13 10:55:39 -05:00
ecam.c PCI: Use resource_set_{range,size}() helpers 2024-10-10 17:44:57 -05:00
host-bridge.c PCI: VMD: ACPI: Make ACPI companion lookup work for VMD bus 2021-09-02 17:59:58 +02:00
iomap.c PCI: Fix typos 2024-09-19 14:24:00 -05:00
iov.c PCI: Use resource_set_{range,size}() helpers 2024-10-10 17:44:57 -05:00
irq.c PCI: Place interrupt related code into irq.c 2024-01-29 17:01:31 -06:00
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 PCI/sysfs: Compile pci-sysfs.c only if CONFIG_SYSFS=y 2024-03-05 16:08:43 -06:00
npem.c PCI/NPEM: Add _DSM PCIe SSD status LED management 2024-09-06 11:37:24 -05:00
of_property.c PCI: of_property: Assign PCI instead of CPU bus address to dynamic PCI nodes 2024-11-15 11:17:52 -06:00
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 sysfs: treewide: constify attribute callback of bin_attribute::mmap() 2024-11-05 14:00:28 +01:00
pci-acpi.c ACPI: RISC-V: Implement PCI related functionality 2024-08-27 15:48:35 +02:00
pci-bridge-emul.c PCI: Rename CRS Completion Status to RRS 2024-09-10 19:52:30 -05:00
pci-bridge-emul.h PCI: pci-bridge-emul: Set position of PCI capabilities to real HW value 2022-08-25 12:07:56 +02:00
pci-driver.c PCI: Make pci_bus_type constant 2024-08-23 12:46:22 -05:00
pci-label.c PCI/sysfs: Use sysfs_emit() and sysfs_emit_at() in "show" functions 2021-06-03 22:14:47 -05:00
pci-mid.c PCI/PM: Switch to new Intel CPU model defines 2024-06-11 17:08:14 -05:00
pci-pf-stub.c PCI: Add missing MODULE_DESCRIPTION() macros 2024-07-08 08:35:35 +00:00
pci-stub.c PCI: Add missing MODULE_DESCRIPTION() macros 2024-07-08 08:35:35 +00:00
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 PCI: Remove pci_mmap_page_range() wrapper 2022-07-29 12:08:44 -05:00
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 PCI: Prefer 'unsigned int' over bare 'unsigned' 2021-10-27 13:41:22 -05:00
search.c PCI: Add pci_get_base_class() helper 2023-09-28 16:49:44 -05:00
setup-bus.c PCI: Improve pdev_sort_resources() warning message 2024-10-18 18:41:11 -05:00
setup-res.c PCI: Use resource_set_{range,size}() helpers 2024-10-10 17:44:57 -05:00
slot.c Merge branch 'pci/misc' 2024-11-25 13:41:00 -06:00
syscall.c PCI: Use consistent put_user() pointer types 2023-08-25 08:15:13 -05:00
tph.c PCI/TPH: Add Steering Tag support 2024-10-02 16:23:10 -05:00
vc.c PCI/VC: Use FIELD_GET() 2023-10-24 16:55:45 -05:00
vgaarb.c pci-v6.7-changes 2023-11-02 14:05:18 -10:00
vpd.c sysfs: treewide: constify attribute callback of bin_is_visible() 2024-11-05 14:00:28 +01:00
xen-pcifront.c x86: always initialize xen-swiotlb when xen-pcifront is enabling 2023-07-31 17:54:27 +02:00