[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220112082602.667614-1-chi.minghao@zte.com.cn>
Date: Wed, 12 Jan 2022 08:26:02 +0000
From: cgel.zte@...il.com
To: jdelvare@...e.com
Cc: linux-hwmon@...r.kernel.org, linux-kernel@...r.kernel.org,
Minghao Chi <chi.minghao@....com.cn>,
Zeal Robot <zealci@....com.cn>, CGEL ZTE <cgel.zte@...il.com>
Subject: [PATCH] drivers/hwmon: remove redundant freq variable
From: Minghao Chi <chi.minghao@....com.cn>
Return value directly instead of taking this in another redundant
variable.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@...il.com>
---
drivers/hwmon/w83627hf.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c
index 9be277156ed2..0feb581975cf 100644
--- a/drivers/hwmon/w83627hf.c
+++ b/drivers/hwmon/w83627hf.c
@@ -283,9 +283,7 @@ static int TEMP_FROM_REG(u8 reg)
static inline unsigned long pwm_freq_from_reg_627hf(u8 reg)
{
- unsigned long freq;
- freq = W83627HF_BASE_PWM_FREQ >> reg;
- return freq;
+ return W83627HF_BASE_PWM_FREQ >> reg;
}
static inline u8 pwm_freq_to_reg_627hf(unsigned long val)
{
--
2.25.1
Powered by blists - more mailing lists