Skip to content

driver core: Constify the signature of device_show/store_*()

Thomas Weißschuh driver-core linux-arm-kernel linux-arm-msm linux-cxl linux-edac linux-perf-users linuxppc-dev lkml 2 versions – In review

Get series with b4
b4 am 20260907-sysfs-const-attr-dev_ext_attr-v2-0-bf53afe57071@weissschuh.net change-id 20260712-sysfs-const-attr-dev_ext_attr-dbf669fdfd4e

Versions newest first

  1. v2 Latest3 patches 1 replyIn review
  2. v13 patches 0 repliesSuperseded

Changes in v2 from the cover letter

- Rebase on v7.3-rc1.
- Cover a few more drivers in drivers/perf/.
- Link to v1: https://patch.msgid.link/20260714-sysfs-const-attr-dev_ext_attr-v1-0-6b2c0435d621@weissschuh.net

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3x86/mce: Use __DEVICE_ATTR() macro to initialize dev_ext_attributearch/x86/kernel/cpu/mce/core.c+3 -30 replies
2/3drivers: perf: Use __DEVICE_ATTR() macro to initialize dev_ext_attributedrivers/perf/alibaba_uncore_drw_pmu.c drivers/perf/arm-cci.c drivers/perf/arm-ccn.c +14 more+35 -351 reply
3/3driver core: Constify the signature of device_show/store_*()arch/powerpc/perf/hv-24x7.c drivers/base/core.c include/linux/device.h+23 -230 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchJonathan Cameron
1/3
2/3A-b
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/3] driver core: Constify the signature of device_show/store_*()

Prepare for the constification of 'struct dev_ext_attribute' instances by changing the signature of the standard callback functions. The first two patches prepare some drivers to handle both the const and non-const callback variants.

Intended for the driver-core tree.

---
Changes in v2:
- Rebase on v7.3-rc1.
- Cover a few more drivers in drivers/perf/.
- Link to v1: https://patch.msgid.link/20260714-sysfs-const-attr-dev_ext_attr-v1-0-6b2c0435d621@weissschuh.net

---
Thomas Weißschuh (3):
x86/mce: Use __DEVICE_ATTR() macro to initialize dev_ext_attribute
drivers: perf: Use __DEVICE_ATTR() macro to initialize dev_ext_attribute driver core: Constify the signature of device_show/store_*()

 arch/powerpc/perf/hv-24x7.c                 |  2 +-
 arch/x86/kernel/cpu/mce/core.c              |  6 +++---
 drivers/base/core.c                         | 30 ++++++++++++++---------------
 drivers/perf/alibaba_uncore_drw_pmu.c       |  2 +-
 drivers/perf/arm-cci.c                      |  2 +-
 drivers/perf/arm-ccn.c                      |  2 +-
 drivers/perf/arm_cspmu/arm_cspmu.h          |  2 +-
 drivers/perf/arm_dsu_pmu.c                  |  2 +-
 drivers/perf/arm_spe_pmu.c                  |  6 +++---
 drivers/perf/cxl_pmu.c                      | 10 +++++-----
 drivers/perf/fsl_imx8_ddr_perf.c            |  2 +-
 drivers/perf/fujitsu_uncore_pmu.c           |  2 +-
 drivers/perf/hisilicon/hisi_pcie_pmu.c      |  2 +-
 drivers/perf/hisilicon/hisi_uncore_pmu.h    |  6 +++---
 drivers/perf/hisilicon/hns3_pmu.c           |  6 +++---
 drivers/perf/nvidia_t410_c2c_pmu.c          |  2 +-
 drivers/perf/nvidia_t410_cmem_latency_pmu.c | 12 ++++++------
 drivers/perf/qcom_l3_pmu.c                  |  8 ++++----
 drivers/perf/starfive_starlink_pmu.c        |  2 +-
 drivers/perf/xgene_pmu.c                    |  2 +-
 include/linux/device.h                      | 14 +++++++-------
 21 files changed, 61 insertions(+), 61 deletions(-)

---
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
change-id: 20260712-sysfs-const-attr-dev_ext_attr-dbf669fdfd4e

Best regards,

Signature · 1 line
Thomas Weißschuh <[email protected]>