Message ID | 20211215114050.GB14967@kili (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | hwmon: (nct6775) delete some new lines | expand |
On Wed, Dec 15, 2021 at 02:40:50PM +0300, Dan Carpenter wrote: > This code can fit on one line. No need to break it up. > > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Applied. Thanks, Guenter > --- > drivers/hwmon/nct6775.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c > index 57ce8633a725..2c5057fa3b71 100644 > --- a/drivers/hwmon/nct6775.c > +++ b/drivers/hwmon/nct6775.c > @@ -3154,10 +3154,8 @@ store_speed_tolerance(struct device *dev, struct device_attribute *attr, > if (err < 0) > return err; > > - high = fan_from_reg16(data->target_speed[nr], > - data->fan_div[nr]) + val; > - low = fan_from_reg16(data->target_speed[nr], > - data->fan_div[nr]) - val; > + high = fan_from_reg16(data->target_speed[nr], data->fan_div[nr]) + val; > + low = fan_from_reg16(data->target_speed[nr], data->fan_div[nr]) - val; > if (low <= 0) > low = 1; > if (high < low)
diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c index 57ce8633a725..2c5057fa3b71 100644 --- a/drivers/hwmon/nct6775.c +++ b/drivers/hwmon/nct6775.c @@ -3154,10 +3154,8 @@ store_speed_tolerance(struct device *dev, struct device_attribute *attr, if (err < 0) return err; - high = fan_from_reg16(data->target_speed[nr], - data->fan_div[nr]) + val; - low = fan_from_reg16(data->target_speed[nr], - data->fan_div[nr]) - val; + high = fan_from_reg16(data->target_speed[nr], data->fan_div[nr]) + val; + low = fan_from_reg16(data->target_speed[nr], data->fan_div[nr]) - val; if (low <= 0) low = 1; if (high < low)
This code can fit on one line. No need to break it up. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> --- drivers/hwmon/nct6775.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)