linux-next/drivers/perf
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
..
amlogic
arm_cspmu
hisilicon
alibaba_uncore_drw_pmu.c
apple_m1_cpu_pmu.c
arm_dmc620_pmu.c
arm_dsu_pmu.c
arm_pmu_acpi.c
arm_pmu_platform.c
arm_pmu.c
arm_pmuv3.c
arm_smmuv3_pmu.c perf/arm-smmuv3: Fix lockdep assert in ->event_init() 2024-11-25 18:52:46 +00:00
arm_spe_pmu.c
arm_v6_pmu.c
arm_v7_pmu.c
arm_xscale_pmu.c
arm-cci.c
arm-ccn.c
arm-cmn.c perf/arm-cmn: Ensure port and device id bits are set properly 2024-11-25 18:53:05 +00:00
arm-ni.c perf: arm-ni: Remove spurious NULL in attribute_group definition 2024-11-18 16:20:46 +01:00
cxl_pmu.c module: Convert symbol namespace to string literal 2024-12-02 11:34:44 -08:00
dwc_pcie_pmu.c
fsl_imx8_ddr_perf.c
fsl_imx9_ddr_perf.c
Kconfig
Makefile
marvell_cn10k_ddr_pmu.c
marvell_cn10k_tad_pmu.c
marvell_pem_pmu.c
qcom_l2_pmu.c
qcom_l3_pmu.c
riscv_pmu_legacy.c
riscv_pmu_sbi.c
riscv_pmu.c
starfive_starlink_pmu.c
thunderx2_pmu.c
xgene_pmu.c