Files
linux/sound/soc/codecs
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
..
2024-06-10 12:48:36 +01:00
2021-04-20 17:25:51 +01:00
2024-08-01 12:51:45 +01:00
2024-06-28 13:39:30 +01:00
2024-08-26 15:52:09 +01:00
2023-09-11 13:34:39 +01:00
2023-12-01 16:59:23 +00:00
2024-10-24 16:09:18 +01:00
2023-08-11 21:12:45 +02:00
2021-03-31 18:00:38 +01:00
2024-10-09 14:40:49 +01:00
2024-03-26 11:24:24 +00:00
2018-04-26 12:44:15 +01:00
2024-09-05 12:31:03 +01:00
2024-09-05 12:31:03 +01:00
2024-03-28 15:54:04 +00:00
2024-06-18 16:45:46 +01:00
2024-10-17 12:11:33 +01:00
2024-10-17 12:11:33 +01:00
2024-10-17 12:11:33 +01:00
2024-10-17 12:11:33 +01:00
2024-04-03 16:07:41 +01:00
2024-04-03 16:07:41 +01:00
2024-04-30 00:15:57 +09:00
2024-04-30 00:15:57 +09:00
2024-11-14 11:39:47 +00:00
2020-05-07 13:18:04 +01:00
2022-10-13 13:01:32 +01:00
2024-04-03 16:07:41 +01:00
2024-04-03 16:07:41 +01:00
2024-10-25 14:10:22 +01:00
2024-10-25 14:10:22 +01:00
2024-04-03 16:07:41 +01:00
2021-12-06 10:04:05 +01:00
2022-07-08 11:52:42 +01:00
2021-12-06 10:04:05 +01:00
2018-06-01 12:05:30 +01:00
2024-11-14 11:39:47 +00:00
2020-07-20 15:34:29 +01:00
2020-10-02 21:05:29 +01:00
2024-08-08 09:14:57 +01:00
2024-08-08 09:14:57 +01:00