1
0
Fork 0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-01-22 07:53:11 -05:00
linux/drivers/fpga
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
..
tests fpga: Simplify and improve fpga region test using deferred actions 2024-08-14 23:51:04 +08:00
altera-cvp.c fpga: altera-cvp: Remove an unused field in struct altera_cvp_conf 2024-04-02 14:31:08 +08:00
altera-fpga2sdram.c fpga: Switch back to struct platform_driver::remove() 2024-11-11 10:43:21 +08:00
altera-freeze-bridge.c fpga: Switch back to struct platform_driver::remove() 2024-11-11 10:43:21 +08:00
altera-hps2fpga.c fpga: Switch back to struct platform_driver::remove() 2024-11-11 10:43:21 +08:00
altera-pr-ip-core-plat.c
altera-pr-ip-core.c
altera-ps-spi.c fpga: altera: drop driver owner assignment 2024-04-01 16:39:57 +08:00
dfl-afu-dma-region.c
dfl-afu-error.c
dfl-afu-main.c fpga: Switch back to struct platform_driver::remove() 2024-11-11 10:43:21 +08:00
dfl-afu-region.c
dfl-afu.h fpga: dfl: remove unused member pdata from struct dfl_{afu,fme} 2024-04-23 15:36:33 +08:00
dfl-fme-br.c fpga: Switch back to struct platform_driver::remove() 2024-11-11 10:43:21 +08:00
dfl-fme-error.c
dfl-fme-main.c fpga: Switch back to struct platform_driver::remove() 2024-11-11 10:43:21 +08:00
dfl-fme-mgr.c
dfl-fme-perf.c
dfl-fme-pr.c
dfl-fme-pr.h
dfl-fme-region.c fpga: Switch back to struct platform_driver::remove() 2024-11-11 10:43:21 +08:00
dfl-fme.h fpga: dfl: remove unused member pdata from struct dfl_{afu,fme} 2024-04-23 15:36:33 +08:00
dfl-n3000-nios.c
dfl-pci.c fpga/dfl-pci.c: Replace deprecated PCI functions 2024-11-07 07:10:11 -06:00
dfl.c driver core: have match() callback in struct bus_type take a const * 2024-07-03 15:16:54 +02:00
dfl.h fpga: dfl: remove unused function is_dfl_feature_present() 2024-04-23 15:36:33 +08:00
fpga-bridge.c fpga: bridge: add owner module and take its refcount 2024-03-31 21:54:44 +08:00
fpga-mgr.c fpga: manager: add owner module and take its refcount 2024-03-31 21:50:39 +08:00
fpga-region.c fpga: region: add owner module and take its refcount 2024-04-23 15:37:20 +08:00
ice40-spi.c fpga: ice40-spi: Don't use "proxy" headers 2024-04-23 15:36:32 +08:00
intel-m10-bmc-sec-update.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
Kconfig fpga: xilinx-selectmap: add new driver 2024-03-31 22:44:21 +08:00
lattice-sysconfig-spi.c
lattice-sysconfig.c
lattice-sysconfig.h
machxo2-spi.c
Makefile fpga: xilinx-selectmap: add new driver 2024-03-31 22:44:21 +08:00
microchip-spi.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
of-fpga-region.c fpga: Switch back to struct platform_driver::remove() 2024-11-11 10:43:21 +08:00
socfpga-a10.c fpga: Switch back to struct platform_driver::remove() 2024-11-11 10:43:21 +08:00
socfpga.c fpga: socfpga: Rename 'timeout' variable as 'time_left' 2024-08-14 23:57:07 +08:00
stratix10-soc.c fpga: Switch back to struct platform_driver::remove() 2024-11-11 10:43:21 +08:00
ts73xx-fpga.c
versal-fpga.c
xilinx-core.c fpga: xilinx-core: add new gpio names for prog and init 2024-03-31 22:48:13 +08:00
xilinx-core.h fpga: xilinx-spi: extract a common driver core 2024-03-31 22:41:26 +08:00
xilinx-pr-decoupler.c fpga: Switch back to struct platform_driver::remove() 2024-11-11 10:43:21 +08:00
xilinx-selectmap.c fpga: xilinx-selectmap: add new driver 2024-03-31 22:44:21 +08:00
xilinx-spi.c fpga: xilinx-spi: extract a common driver core 2024-03-31 22:41:26 +08:00
zynq-fpga.c fpga: Switch back to struct platform_driver::remove() 2024-11-11 10:43:21 +08:00
zynqmp-fpga.c