linux-stable/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 perf: Switch back to struct platform_driver::remove() 2024-11-06 14:16:20 +00:00
arm_cspmu perf: Switch back to struct platform_driver::remove() 2024-11-06 14:16:20 +00:00
hisilicon perf: Switch back to struct platform_driver::remove() 2024-11-06 14:16:20 +00:00
alibaba_uncore_drw_pmu.c perf: Switch back to struct platform_driver::remove() 2024-11-06 14:16:20 +00:00
apple_m1_cpu_pmu.c drivers/perf: apple_m1: add known PMU events 2024-08-23 15:52:48 +01:00
arm_dmc620_pmu.c perf: Switch back to struct platform_driver::remove() 2024-11-06 14:16:20 +00:00
arm_dsu_pmu.c perf: Switch back to struct platform_driver::remove() 2024-11-06 14:16:20 +00:00
arm_pmu_acpi.c arm_pmu: acpi: Add a representative platform device for TRBE 2023-08-18 18:07:10 +01:00
arm_pmu_platform.c perf: arm_pmu: Use of_property_present() 2024-08-16 13:08:21 +01:00
arm_pmu.c perf: arm_pmu: Remove event index to counter remapping 2024-08-16 13:09:11 +01:00
arm_pmuv3.c perf: arm_pmuv3: Add support for Samsung Mongoose PMU 2024-10-29 13:23:25 +00:00
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 perf: Switch back to struct platform_driver::remove() 2024-11-06 14:16:20 +00:00
arm_v6_pmu.c perf: arm_pmu: Remove event index to counter remapping 2024-08-16 13:09:11 +01:00
arm_v7_pmu.c perf: arm_pmu: Remove event index to counter remapping 2024-08-16 13:09:11 +01:00
arm_xscale_pmu.c perf: arm_pmu: Remove event index to counter remapping 2024-08-16 13:09:11 +01:00
arm-cci.c perf: Switch back to struct platform_driver::remove() 2024-11-06 14:16:20 +00:00
arm-ccn.c perf: Switch back to struct platform_driver::remove() 2024-11-06 14:16:20 +00:00
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 perf/dwc_pcie: Fix typos in event names 2024-10-29 13:01:14 +00:00
fsl_imx8_ddr_perf.c perf: Switch back to struct platform_driver::remove() 2024-11-06 14:16:20 +00:00
fsl_imx9_ddr_perf.c perf: Switch back to struct platform_driver::remove() 2024-11-06 14:16:20 +00:00
Kconfig perf/marvell: Marvell PEM performance monitor support 2024-10-28 17:35:35 +00:00
Makefile perf/marvell: Marvell PEM performance monitor support 2024-10-28 17:35:35 +00:00
marvell_cn10k_ddr_pmu.c perf: Switch back to struct platform_driver::remove() 2024-11-06 14:16:20 +00:00
marvell_cn10k_tad_pmu.c perf: Switch back to struct platform_driver::remove() 2024-11-06 14:16:20 +00:00
marvell_pem_pmu.c perf/marvell: Marvell PEM performance monitor support 2024-10-28 17:35:35 +00:00
qcom_l2_pmu.c perf: Switch back to struct platform_driver::remove() 2024-11-06 14:16:20 +00:00
qcom_l3_pmu.c Driver core changes for 6.10-rc1 2024-05-22 12:13:40 -07:00
riscv_pmu_legacy.c drivers/perf: riscv: Align errno for unsupported perf event 2024-10-01 02:47:39 -07:00
riscv_pmu_sbi.c drivers: perf: Fix wrong put_cpu() placement 2024-11-12 07:34:27 -08:00
riscv_pmu.c drivers/perf: riscv: Remove redundant macro check 2024-09-15 20:15:48 -07:00
starfive_starlink_pmu.c perf: starfive: Add StarLink PMU support 2024-03-04 14:19:48 +00:00
thunderx2_pmu.c perf: Switch back to struct platform_driver::remove() 2024-11-06 14:16:20 +00:00
xgene_pmu.c perf: Switch back to struct platform_driver::remove() 2024-11-06 14:16:20 +00:00