Re: [bug report] hwmon: (nct6775) Add support for weighted fan control

2018-09-05 Thread Guenter Roeck
Hi Dan, On 09/05/2018 12:57 AM, Dan Carpenter wrote: Done. Btw, I saw another that looks legit. Thanks ... drivers/hwmon/nct6775.c:1687 nct6775_update_device() error: buffer overflow 'data->FAN_PULSE_SHIFT' 6 <= 6 drivers/hwmon/nct6775.c 1667 data->in[i][2] =

Re: [PATCH 2/2] hwmon: (nct6775) Clean up a condition

2018-09-05 Thread Guenter Roeck
On Wed, Sep 05, 2018 at 10:46:55AM +0300, Dan Carpenter wrote: > I removed the "dsw_en &&" chunk of the condition because we know that > "dsw_en" is set. > > Signed-off-by: Dan Carpenter Applied to hwmon-next. Thanks, Guenter > > diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c

Re: [PATCH 1/2] hwmon: (nct6775) Set weight source to zero correctly

2018-09-05 Thread Guenter Roeck
On Wed, Sep 05, 2018 at 10:46:27AM +0300, Dan Carpenter wrote: > This is dead code because j can never be 1 at this point. We had > intended to just test if the bit was clear. > > Fixes: bbd8decd4123 ("hwmon: (nct6775) Add support for weighted fan control") > Signed-off-by: Dan Carpenter

Re: [bug report] hwmon: (nct6775) Add support for weighted fan control

2018-09-05 Thread Dan Carpenter
Done. Btw, I saw another that looks legit. drivers/hwmon/nct6775.c:1687 nct6775_update_device() error: buffer overflow 'data->FAN_PULSE_SHIFT' 6 <= 6 drivers/hwmon/nct6775.c 1667 data->in[i][2] = nct6775_read_value(data, 1668

[PATCH 1/2] hwmon: (nct6775) Set weight source to zero correctly

2018-09-05 Thread Dan Carpenter
This is dead code because j can never be 1 at this point. We had intended to just test if the bit was clear. Fixes: bbd8decd4123 ("hwmon: (nct6775) Add support for weighted fan control") Signed-off-by: Dan Carpenter diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c index

[PATCH 2/2] hwmon: (nct6775) Clean up a condition

2018-09-05 Thread Dan Carpenter
I removed the "dsw_en &&" chunk of the condition because we know that "dsw_en" is set. Signed-off-by: Dan Carpenter diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c index 139781ae830b..719effe53ceb 100644 --- a/drivers/hwmon/nct6775.c +++ b/drivers/hwmon/nct6775.c @@ -3533,8