linux-stable/arch/s390
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
..
appldata sysctl: treewide: constify the ctl_table argument of proc_handlers 2024-07-24 20:59:29 +02:00
boot Revert "s390/mm: Allow large pages for KASAN shadow mapping" 2024-11-29 13:41:11 +01:00
configs s390 updates for 6.13 merge window 2024-11-18 17:45:41 -08:00
crypto module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
hypfs [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
include more s390 updates for 6.13 merge window 2024-11-29 10:40:52 -08:00
kernel more s390 updates for 6.13 merge window 2024-11-29 10:40:52 -08:00
kvm more s390 updates for 6.13 merge window 2024-11-29 10:40:52 -08:00
lib more s390 updates for 6.13 merge window 2024-11-29 10:40:52 -08:00
mm more s390 updates for 6.13 merge window 2024-11-29 10:40:52 -08:00
net s390/bpf: Implement exceptions 2024-07-08 16:39:35 +02:00
pci more s390 updates for 6.13 merge window 2024-11-29 10:40:52 -08:00
purgatory s390: Fix various typos 2024-10-25 16:03:23 +02:00
tools KVM: s390: add gen17 facilities to CPU model 2024-11-11 12:07:51 +00:00
Kbuild - An extensive rework of kexec and crash Kconfig from Eric DeVolder 2023-08-29 14:53:51 -07:00
Kconfig more s390 updates for 6.13 merge window 2024-11-29 10:40:52 -08:00
Kconfig.debug s390/Kconfig.debug: fix indentation 2022-06-01 12:03:15 +02:00
Makefile s390: use a larger stack for KMSAN 2024-07-03 19:30:24 -07:00
Makefile.postlink s390/build: Avoid relocation information in final vmlinux 2024-08-27 20:16:48 +02:00