linux-stable/drivers/firmware
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
..
arm_ffa firmware: arm_ffa: Avoid string-fortify warning caused by memcpy() 2024-10-15 13:50:10 +01:00
arm_scmi Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
broadcom MIPS: BCM47XX: remove MODULE_LICENSE in non-modules 2023-04-13 13:13:51 -07:00
cirrus module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
efi module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
google Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
imx firmware: Switch back to struct platform_driver::remove() 2024-11-12 12:55:56 +01:00
meson firmware: meson_sm: add missing MODULE_DESCRIPTION() macro 2024-06-24 10:08:53 +02:00
microchip Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
psci arm64: Use SYSTEM_OFF2 PSCI call to power off for hibernate 2024-10-31 17:52:13 +00:00
qcom soc: driver updates for 6.12 2024-11-20 15:40:54 -08:00
smccc arm64: smccc: Remove broken support for SMCCCv1.3 SVE discard hint 2024-11-07 11:18:52 +00:00
tegra Revert "firmware: tegra: bpmp: Use scoped device node handling to simplify error paths" 2024-10-24 18:38:07 +02:00
xilinx Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
arm_scpi.c Char/Misc/IIO/Whatever driver subsystem updates for 6.13-rc1 2024-11-29 11:58:27 -08:00
arm_sdei.c firmware: arm_sdei: Fix the input parameter of cpuhp_remove_state() 2024-10-23 16:19:03 +01:00
dmi_scan.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
dmi-id.c firmware: dmi-id: add a release callback function 2024-04-08 09:34:24 +02:00
dmi-sysfs.c firmware: dmi-sysfs: handle HAS_IOPORT=n 2023-05-31 19:17:29 +01:00
edd.c edd: make kobj_type structure constant 2023-03-09 18:07:33 +01:00
iscsi_ibft_find.c iscsi_ibft: Fix finding the iBFT under Xen Dom 0 2023-06-26 07:47:11 +02:00
iscsi_ibft.c iscsi_ibft: Fix isa_bus_to_virt not working under ARM 2021-09-02 16:22:00 -04:00
Kconfig video: Add helpers for decoding screen_info 2024-02-14 10:09:13 +01:00
Makefile Core: 2024-01-12 13:54:25 -08:00
memmap.c firmware: memmap: Constify memmap_ktype 2024-10-13 17:22:33 +02:00
mtk-adsp-ipc.c firmware: Switch back to struct platform_driver::remove() 2024-11-12 12:55:56 +01:00
qemu_fw_cfg.c firmware: Switch back to struct platform_driver::remove() 2024-11-12 12:55:56 +01:00
raspberrypi.c firmware: Switch back to struct platform_driver::remove() 2024-11-12 12:55:56 +01:00
stratix10-rsu.c firmware: Switch back to struct platform_driver::remove() 2024-11-12 12:55:56 +01:00
stratix10-svc.c firmware: Switch back to struct platform_driver::remove() 2024-11-12 12:55:56 +01:00
sysfb_simplefb.c firmware/sysfb: Set firmware-framebuffer parent device 2024-02-14 10:09:17 +01:00
sysfb.c chrome platform firmware changes for 6.13 2024-11-19 10:25:47 -08:00
ti_sci.c firmware: ti_sci: Remove use of of_match_ptr() helper 2024-10-25 12:56:37 -05:00
ti_sci.h firmware: ti_sci: Introduce Power Management Ops 2024-10-25 10:45:07 -05:00
trusted_foundations.c
turris-mox-rwtm.c firmware: turris-mox-rwtm: Document the driver private data structure 2024-11-12 16:03:34 +01:00