linux/sound/soc/sdw_utils
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
..
Kconfig ASoC: intel/sdw-utils: move soundwire machine driver soc ops 2024-08-01 12:43:57 +01:00
Makefile ASoC: intel/sdw_utils: refactor RT multifunction sdca speaker codecs 2024-10-07 17:10:54 +01:00
soc_sdw_bridge_cs35l56.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
soc_sdw_cs42l42.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
soc_sdw_cs42l43.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
soc_sdw_cs_amp.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
soc_sdw_dmic.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
soc_sdw_maxim.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
soc_sdw_rt700.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
soc_sdw_rt711.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
soc_sdw_rt5682.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
soc_sdw_rt_amp_coeff_tables.h ASoC: intel/sdw_utils: move rtk amp codec helper functions 2024-08-01 12:44:07 +01:00
soc_sdw_rt_amp.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
soc_sdw_rt_dmic.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
soc_sdw_rt_mf_sdca.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
soc_sdw_rt_sdca_jack_common.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
soc_sdw_utils.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00