linux-stable/drivers/media
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
..
cec Linux 6.12-rc7 2024-11-11 12:16:33 +01:00
common module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
dvb-core media: dvbdev: fix the logic when DVB_DYNAMIC_MINORS is not set 2024-11-06 22:32:52 +01:00
dvb-frontends Linux 6.12-rc7 2024-11-11 12:16:33 +01:00
firewire media: firewire: firedtv-avc.c: replace BUG with proper, error return 2023-08-10 07:58:37 +02:00
i2c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
mc media updates for v6.13-rc1 2024-11-20 14:01:15 -08:00
mmc media: mmc: siano: simplify module initialization 2024-04-08 13:48:19 +02:00
pci module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
platform module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
radio Linux 6.12-rc7 2024-11-11 12:16:33 +01:00
rc media updates for v6.13-rc1 2024-11-20 14:01:15 -08:00
spi media: gs1662: remove unused struct 'gs_reg_fmt_custom' 2024-05-31 13:51:16 +02:00
test-drivers media updates for v6.13-rc1 2024-11-20 14:01:15 -08:00
tuners Linux 6.12-rc7 2024-11-11 12:16:33 +01:00
usb media updates for v6.13-rc1 2024-11-20 14:05:34 -08:00
v4l2-core Linux 6.12-rc7 2024-11-11 12:16:33 +01:00
Kconfig media: Kconfig: Make DVB_CORE=m possible when MEDIA_SUPPORT=y 2022-12-07 17:58:46 +01:00
Makefile