linux/drivers/vfio/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
..
hisilicon hisi_acc_vfio_pci: register debugfs for hisilicon migration driver 2024-11-13 14:58:47 -07:00
mlx5 module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
nvgrace-gpu vfio/nvgrace-gpu: Add a new GH200 SKU to the devid table 2024-10-30 13:35:18 -06:00
pds module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
qat module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
virtio vfio/virtio: Enable live migration once VIRTIO_PCI was configured 2024-11-13 16:28:32 -07:00
Kconfig vfio/qat: Add vfio_pci driver for Intel QAT SR-IOV VF devices 2024-04-29 13:25:41 -06:00
Makefile vfio/qat: Add vfio_pci driver for Intel QAT SR-IOV VF devices 2024-04-29 13:25:41 -06:00
trace.h
vfio_pci_config.c vfio/pci: Properly hide first-in-list PCIe extended capability 2024-11-25 08:34:22 -07:00
vfio_pci_core.c VFIO updates for v6.12 2024-09-24 12:07:47 -07:00
vfio_pci_igd.c vfio: Use GFP_KERNEL_ACCOUNT for userspace persistent allocations 2023-01-23 11:26:29 -07:00
vfio_pci_intrs.c vfio/pci: fix potential memory leak in vfio_intx_enable() 2024-04-22 16:52:08 -06:00
vfio_pci_priv.h
vfio_pci_rdwr.c vfio/pci: Support 8-byte PCI loads and stores 2024-06-21 12:47:01 -06:00
vfio_pci_zdev.c
vfio_pci.c VFIO: Add the SPR_DSA and SPR_IAX devices to the denylist 2024-05-13 14:07:33 +00:00