Skip to content

Deduplicate string exposure in sysfs

Lukas Wunner linux-arm-kernel linux-hwmon linux-rdma linux-scsi linuxppc-dev lkml platform-driver-x86 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6driver core: Add device_show_string() helper for sysfs attributesarch/powerpc/perf/hv-24x7.c drivers/base/core.c include/linux/device.h+24 -101 reply
2/6hwmon: Use device_show_string() helper for sysfs attributesdrivers/hwmon/i5k_amb.c drivers/hwmon/ibmpex.c+8 -211 reply
3/6IB/qib: Use device_show_string() helper for sysfs attributesdrivers/infiniband/hw/qib/qib.h drivers/infiniband/hw/qib/qib_driver.c drivers/infiniband/hw/qib/qib_sysfs.c+2 -150 replies
4/6perf: Use device_show_string() helper for sysfs attributesarch/x86/events/intel/core.c drivers/perf/alibaba_uncore_drw_pmu.c drivers/perf/arm-cci.c +11 more+15 -1390 replies
5/6platform/x86: Use device_show_string() helper for sysfs attributesdrivers/platform/x86/asus-wmi.c drivers/platform/x86/thinkpad_acpi.c drivers/platform/x86/toshiba_acpi.c+20 -611 reply
6/6scsi: Use device_show_string() helper for sysfs attributesdrivers/scsi/bfa/bfad_attr.c drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c drivers/scsi/mvsas/mv_init.c +2 more+16 -550 replies

Reviews trailers per patch

3 of 6 patches have a Reviewed-by or Acked-by.

PatchGuenter RoeckMichael EllermanHans de Goede
1/6A-b
2/6A-b
3/6
4/6
5/6A-b
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/6] Deduplicate string exposure in sysfs

Introduce a generic ->show() callback to expose a string as a device attribute in sysfs. Deduplicate various identical callbacks across the tree.

Result: Minus 216 LoC, minus 1576 bytes vmlinux size (x86_64 allyesconfig).

This is a byproduct of my upcoming PCI device authentication v2 patches.

Lukas Wunner (6):
driver core: Add device_show_string() helper for sysfs attributes
hwmon: Use device_show_string() helper for sysfs attributes IB/qib: Use device_show_string() helper for sysfs attributes
perf: Use device_show_string() helper for sysfs attributes platform/x86: Use device_show_string() helper for sysfs attributes
scsi: Use device_show_string() helper for sysfs attributes

 arch/powerpc/perf/hv-24x7.c              | 10 ----
 arch/x86/events/intel/core.c             | 13 ++---
 drivers/base/core.c                      |  9 ++++
 drivers/hwmon/i5k_amb.c                  | 15 ++----
 drivers/hwmon/ibmpex.c                   | 14 ++----
 drivers/infiniband/hw/qib/qib.h          |  1 -
 drivers/infiniband/hw/qib/qib_driver.c   |  6 ---
 drivers/infiniband/hw/qib/qib_sysfs.c    | 10 +---
 drivers/perf/alibaba_uncore_drw_pmu.c    | 12 +----
 drivers/perf/arm-cci.c                   | 12 +----
 drivers/perf/arm-ccn.c                   | 11 +----
 drivers/perf/arm_cspmu/arm_cspmu.c       | 10 ----
 drivers/perf/arm_cspmu/arm_cspmu.h       |  7 +--
 drivers/perf/arm_dsu_pmu.c               | 11 +----
 drivers/perf/cxl_pmu.c                   | 13 +----
 drivers/perf/hisilicon/hisi_pcie_pmu.c   | 13 +----
 drivers/perf/hisilicon/hisi_uncore_pmu.c | 14 ------
 drivers/perf/hisilicon/hisi_uncore_pmu.h |  4 +-
 drivers/perf/hisilicon/hns3_pmu.c        | 12 +----
 drivers/perf/qcom_l3_pmu.c               | 11 +----
 drivers/perf/xgene_pmu.c                 | 11 +----
 drivers/platform/x86/asus-wmi.c          | 62 ++++++------------------
 drivers/platform/x86/thinkpad_acpi.c     | 10 +---
 drivers/platform/x86/toshiba_acpi.c      |  9 +---
 drivers/scsi/bfa/bfad_attr.c             | 28 +++--------
 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c | 11 +----
 drivers/scsi/mvsas/mv_init.c             | 10 +---
 drivers/scsi/qla2xxx/qla_attr.c          | 11 +----
 drivers/scsi/smartpqi/smartpqi_init.c    | 11 ++---
 include/linux/device.h                   | 15 ++++++
 30 files changed, 85 insertions(+), 301 deletions(-)
Signature · 1 line
2.43.0