All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hwmon: (nct6775) delete some new lines
@ 2021-12-15 11:40 Dan Carpenter
  2021-12-17 15:30 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-12-15 11:40 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Jean Delvare, linux-hwmon, kernel-janitors

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(-)

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)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] hwmon: (nct6775) delete some new lines
  2021-12-15 11:40 [PATCH] hwmon: (nct6775) delete some new lines Dan Carpenter
@ 2021-12-17 15:30 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2021-12-17 15:30 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Jean Delvare, linux-hwmon, kernel-janitors

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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-17 15:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-15 11:40 [PATCH] hwmon: (nct6775) delete some new lines Dan Carpenter
2021-12-17 15:30 ` Guenter Roeck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.