Re: [PATCH] hwmon: (w83773g) Fix a precedence bug in get_fault()

2017-12-05 Thread Guenter Roeck
On Tue, Dec 05, 2017 at 05:37:26PM +0300, Dan Carpenter wrote: > Shift has higher precedence than mask but presumably we wanted to set > *val to 1 if BIT(2) was set or 0 if the bit was clear. > > Fixes: de0a524e3e09 ("hwmon: Add W83773G driver") > Signed-off-by: Dan Carpenter

[PATCH] hwmon: (w83773g) Fix a precedence bug in get_fault()

2017-12-05 Thread Dan Carpenter
Shift has higher precedence than mask but presumably we wanted to set *val to 1 if BIT(2) was set or 0 if the bit was clear. Fixes: de0a524e3e09 ("hwmon: Add W83773G driver") Signed-off-by: Dan Carpenter diff --git a/drivers/hwmon/w83773g.c b/drivers/hwmon/w83773g.c

Re: [PATCH v2] hwmon: Deal with errors from the thermal subsystem

2017-12-05 Thread Guenter Roeck
On 12/05/2017 12:36 AM, Linus Walleij wrote: If the thermal subsystem returne -EPROBE_DEFER or any other error when hwmon calls devm_thermal_zone_of_sensor_register(), this is silently ignored. I ran into this with an incorrectly defined thermal zone, making it non-existing and thus this call

Re: [PATCH] hwmon: Deal with errors from the thermal subsystem

2017-12-05 Thread Guenter Roeck
On 12/05/2017 12:31 AM, Linus Walleij wrote: On Tue, Dec 5, 2017 at 12:52 AM, Guenter Roeck wrote: - devm_thermal_zone_of_sensor_register(>dev, index, tdata, - _thermal_ops); + tzd =

[PATCH v2] hwmon: Deal with errors from the thermal subsystem

2017-12-05 Thread Linus Walleij
If the thermal subsystem returne -EPROBE_DEFER or any other error when hwmon calls devm_thermal_zone_of_sensor_register(), this is silently ignored. I ran into this with an incorrectly defined thermal zone, making it non-existing and thus this call failed with -EPROBE_DEFER assuming it would

Re: [PATCH] hwmon: Deal with errors from the thermal subsystem

2017-12-05 Thread Linus Walleij
On Tue, Dec 5, 2017 at 12:52 AM, Guenter Roeck wrote: >> - devm_thermal_zone_of_sensor_register(>dev, index, tdata, >> - _thermal_ops); >> + tzd = devm_thermal_zone_of_sensor_register(>dev, index, tdata, >> +