linux/arch/x86
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
..
boot x86 cleanups for v6.13: 2024-11-19 14:46:39 -08:00
coco - Add new infrastructure for reading TDX metadata 2024-11-22 13:07:19 -08:00
configs tinyconfig: remove unnecessary 'is not set' for choice blocks 2024-09-01 20:34:38 +09:00
crypto This update includes the following changes: 2024-11-19 10:28:41 -08:00
entry - The series "zram: optimal post-processing target selection" from 2024-11-23 09:58:07 -08:00
events perf/core: Correct perf sampling with guest VMs 2024-11-14 10:40:01 +01:00
hyperv hyperv-next for v6.12 2024-09-19 08:15:30 +02:00
ia32
include - Add a terminating zero end-element to the array describing AMD CPUs affected 2024-12-01 12:35:37 -08:00
kernel - Add a terminating zero end-element to the array describing AMD CPUs affected 2024-12-01 12:35:37 -08:00
kvm The biggest change here is eliminating the awful idea that KVM had, of 2024-11-23 16:00:50 -08:00
lib x86: fix user address masking non-canonical speculation issue 2024-10-25 09:53:03 -07:00
math-emu x86/math-emu: Fix function cast warnings 2024-04-08 16:06:22 +02:00
mm module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
net bpf, x86: Propagate tailcall info only for subprogs 2024-11-12 17:24:03 -08:00
pci Merge branch 'pci/thunderbolt' 2024-11-25 13:40:55 -06:00
platform EFI updates for v6.13 2024-11-20 14:13:28 -08:00
power - Kuan-Wei Chiu has developed the well-named series "lib min_heap: Min 2024-03-14 18:03:09 -07:00
purgatory Kbuild updates for v6.10 2024-05-18 12:39:20 -07:00
ras
realmode Makefile: remove redundant tool coverage variables 2024-05-14 23:35:48 +09:00
tools First step of consolidating the VDSO data page handling: 2024-11-19 16:09:13 -08:00
um um: fix sparse warnings in signal code 2024-11-07 17:34:50 +01:00
video arch: Fix name collision with ACPI's video.o 2024-05-20 21:17:06 +00:00
virt - Do the proper memory conversion of guest memory in order to be able to kexec 2024-11-19 12:21:35 -08:00
xen x86/xen: Avoid relocatable quantities in Xen ELF notes 2024-10-29 17:23:36 +01:00
.gitignore
Kbuild x86/build: Use obj-y to descend into arch/x86/virt/ 2024-03-30 10:41:49 +01:00
Kconfig Kbuild updates for v6.13 2024-11-30 13:41:50 -08:00
Kconfig.assembler x86/kconfig: Add as-instr64 macro to properly evaluate AS_WRUSS 2024-06-20 19:48:18 +02:00
Kconfig.cpu
Kconfig.debug x86/kconfig: Select ARCH_WANT_FRAME_POINTERS again when UNWINDER_FRAME_POINTER=y 2024-05-20 11:37:23 +02:00
Makefile x86/stackprotector: Work around strict Clang TLS symbol requirements 2024-11-08 13:16:00 +01:00
Makefile_32.cpu
Makefile.postlink
Makefile.um arch: um: rust: Use the generated target.json again 2024-07-03 12:22:11 +02:00