linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hwmon: sis5595: drop unused DIV_TO_REG function
@ 2024-02-25 20:28 Krzysztof Kozlowski
  2024-02-25 20:38 ` Guenter Roeck
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2024-02-25 20:28 UTC (permalink / raw)
  To: Jean Delvare, Guenter Roeck, linux-hwmon, linux-kernel
  Cc: Krzysztof Kozlowski

'DIV_TO_REG' function is not used:

  sis5595.c:159:18: error: unused function 'DIV_TO_REG' [-Werror,-Wunused-function]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/hwmon/sis5595.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/hwmon/sis5595.c b/drivers/hwmon/sis5595.c
index 641be1f7f9cd..e73b1522f3ce 100644
--- a/drivers/hwmon/sis5595.c
+++ b/drivers/hwmon/sis5595.c
@@ -153,13 +153,9 @@ static inline s8 TEMP_TO_REG(long val)
 }
 
 /*
- * FAN DIV: 1, 2, 4, or 8 (defaults to 2)
- * REG: 0, 1, 2, or 3 (respectively) (defaults to 1)
+ * FAN DIV: 1, 2, 4, or 8
+ * REG: 0, 1, 2, or 3 (respectively)
  */
-static inline u8 DIV_TO_REG(int val)
-{
-	return val == 8 ? 3 : val == 4 ? 2 : val == 1 ? 0 : 1;
-}
 #define DIV_FROM_REG(val) (1 << (val))
 
 /*
-- 
2.34.1


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

* Re: [PATCH] hwmon: sis5595: drop unused DIV_TO_REG function
  2024-02-25 20:28 [PATCH] hwmon: sis5595: drop unused DIV_TO_REG function Krzysztof Kozlowski
@ 2024-02-25 20:38 ` Guenter Roeck
  0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2024-02-25 20:38 UTC (permalink / raw)
  To: Krzysztof Kozlowski; +Cc: Jean Delvare, linux-hwmon, linux-kernel

On Sun, Feb 25, 2024 at 09:28:41PM +0100, Krzysztof Kozlowski wrote:
> 'DIV_TO_REG' function is not used:
> 
>   sis5595.c:159:18: error: unused function 'DIV_TO_REG' [-Werror,-Wunused-function]
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Applied.

Thanks,
Guenter

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

end of thread, other threads:[~2024-02-25 20:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-25 20:28 [PATCH] hwmon: sis5595: drop unused DIV_TO_REG function Krzysztof Kozlowski
2024-02-25 20:38 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).