linux/arch/arm64
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 arm64: dts: mediatek: mt8173-elm-hana: Mark touchscreens and trackpads as fail 2024-11-27 12:04:42 +01:00
configs soc: defconfig updates for 6.13 2024-11-20 15:44:56 -08:00
crypto module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
hyperv
include - The series "resource: A couple of cleanups" from Andy Shevchenko 2024-11-25 16:09:48 -08:00
kernel The biggest change here is eliminating the awful idea that KVM had, of 2024-11-23 16:00:50 -08:00
kvm ARM: 2024-11-30 14:51:08 -08:00
lib Merge branch 'for-next/mops' into for-next/core 2024-11-14 12:07:28 +00:00
mm - The series "zram: optimal post-processing target selection" from 2024-11-23 09:58:07 -08:00
net - The series "zram: optimal post-processing target selection" from 2024-11-23 09:58:07 -08:00
tools The biggest change here is eliminating the awful idea that KVM had, of 2024-11-23 16:00:50 -08:00
xen
Kbuild
Kconfig - Move the ->select callback to the correct ops structure in irq-mvebu-sei to 2024-12-01 12:37:58 -08:00
Kconfig.debug
Kconfig.platforms arm64: Kconfig: Update help text for CONFIG_ARCH_APPLE 2024-10-26 00:14:46 +09:00
Makefile kbuild: add $(objtree)/ prefix to some in-kernel build artifacts 2024-11-27 09:38:27 +09:00