Skip to contentSkip to conversation

hwmon: (lm77) Drop function macros

PATCH Jean Delvare 1 participant 1 message Apr 22, 2014

lore
Share & tools
lore

Jean Delvare

author Reviewed-by
#0 lore raw

Hi Guenter,

Quoted 22 lines · Guenter Roeck

Function macros make the code harder to read and increase code size, so drop them.

---
v4: Really provide temp_regs array size this time
Add space before temp_index comment
Rebase to patch 1/3 (fixes regression introduced in v3)

v3: No comma after t_num_entries.
Make temp_regs const and provide array size.
Fix show_temp_hyst, specifically display of low limit hysteresis. Simplify set_temp and handling of hysteresis.

Output with new libsensors:

lm77-i2c-9-49
Adapter: i2c-diolan-u2c at bus 003 device 013
temp1: +22.5°C (low = +10.0°C, hyst = +12.0°C)
(high = +64.0°C, hyst = +62.0°C) (crit = +80.0°C, hyst = +78.0°C)

Quoted 3 lines
 drivers/hwmon/lm77.c |  183 +++++++++++++++++++++-----------------------------
 1 file changed, 75 insertions(+), 108 deletions(-)

(...)

Looks good to me, except for the "preserve hysteresis when setting T_crit" comment which you removed here while it should be removed by the previous patch. But it's only a detail.

Signature · 7 lines
Jean Delvare
SUSE L3 Support

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors