1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/platform/x86/intel/pmc
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
..
adl.c platform/x86:intel/pmc: Revert "Enable the ACPI PM Timer to be turned off when suspended" 2024-10-21 16:04:00 +02:00
arl.c platform/x86/intel/pmc: Refactor platform resume functions to use cnl_resume() 2024-10-22 11:50:51 +03:00
cnp.c platform-drivers-x86 for v6.13-1 2024-11-20 14:07:55 -08:00
core.c platform-drivers-x86 for v6.13-1 2024-11-20 14:07:55 -08:00
core.h platform/x86:intel/pmc: Revert "Enable the ACPI PM Timer to be turned off when suspended" 2024-10-21 16:04:00 +02:00
core_ssram.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
icl.c platform/x86:intel/pmc: Revert "Enable the ACPI PM Timer to be turned off when suspended" 2024-10-21 16:04:00 +02:00
Kconfig platform/x86/intel/pmc: Find and register PMC telemetry entries 2023-12-04 14:53:43 +01:00
lnl.c platform/x86/intel/pmc: Refactor platform resume functions to use cnl_resume() 2024-10-22 11:50:51 +03:00
Makefile platform/x86/intel/pmc: Add Lunar Lake M support to intel_pmc_core driver 2023-12-28 10:06:44 +01:00
mtl.c platform-drivers-x86 for v6.13-1 2024-11-20 14:07:55 -08:00
pltdrv.c platform-drivers-x86 for v6.11-1 2024-07-17 17:05:21 -07:00
spt.c platform/x86:intel/pmc: Disable ACPI PM Timer disabling on Sky and Kaby Lake 2024-10-06 12:34:22 +02:00
tgl.c platform/x86:intel/pmc: Revert "Enable the ACPI PM Timer to be turned off when suspended" 2024-10-21 16:04:00 +02:00