perf: Use device_show_string() helper for sysfs attributes
authorLukas Wunner <lukas@wunner.de>
Sat, 20 Apr 2024 20:00:04 +0000 (22:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 May 2024 15:37:03 +0000 (17:37 +0200)
commitb91b73a43822566930490e5aa421ccb1900a2124
tree63663bca2c8789cac302c3a19475bd8594d0557f
parent7b53e926bfe222fd0cbe94d782d8577ac4116e0a
perf: Use device_show_string() helper for sysfs attributes

Deduplicate sysfs ->show() callbacks which expose a string at a static
memory location.  Use the newly introduced device_show_string() helper
in the driver core instead by declaring those sysfs attributes with
DEVICE_STRING_ATTR_RO().

No functional change intended.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Link: https://lore.kernel.org/r/3a297850312b4ecb62d6872121de04496900f502.1713608122.git.lukas@wunner.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14 files changed:
arch/x86/events/intel/core.c
drivers/perf/alibaba_uncore_drw_pmu.c
drivers/perf/arm-cci.c
drivers/perf/arm-ccn.c
drivers/perf/arm_cspmu/arm_cspmu.c
drivers/perf/arm_cspmu/arm_cspmu.h
drivers/perf/arm_dsu_pmu.c
drivers/perf/cxl_pmu.c
drivers/perf/hisilicon/hisi_pcie_pmu.c
drivers/perf/hisilicon/hisi_uncore_pmu.c
drivers/perf/hisilicon/hisi_uncore_pmu.h
drivers/perf/hisilicon/hns3_pmu.c
drivers/perf/qcom_l3_pmu.c
drivers/perf/xgene_pmu.c