Skip to content

hwmon/pc87360: combine sysfs callbacks

Jim Cromie lm-sensors 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2hwmon/pc87360: use SENSOR_ATTR_2 instead+0 -00 replies
2/2hwmon/pc87360: combine sysfs callbacks+0 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [lm-sensors] [patch 0/2] hwmon/pc87360: combine sysfs callbacks

From: Jim Cromie <jim.cromie at gmail.com>

1. hwmon-pc87360-use-sensor-attr-2.patch

This converts SENSOR_ATTRs to SENSOR_ATTR_2s, and add a bunch of #defines for the new member's values.

2. hwmon-pc87360-sysfs-combo-callbacks.patch

This combines individual (show|set)_Sensor_Attr callbacks into (show|set)_Sensor callbacks that handle all that Sensor's Attrs.

this results in a non-trivial size reduction (b4, after)

 14588    3224      16   17828    45a4 A-2/drivers/hwmon/pc87360.ko
 13124    3224      16   16364    3fec A-3/drivers/hwmon/pc87360.ko

ie about 10%

Combining all show_X (for all X) together is possible, but would compromise clarity,
and would save only ~ 1/5 th additional space.

Signed-off-by Jim Cromie <jim.cromie at gmail.com>

---