2023-03-23 21:30:40

by Tom Rix

[permalink] [raw]
Subject: [PATCH] hwmon: remove unused superio_outb function

clang with W=1 reports
drivers/hwmon/vt1211.c:198:20: error: unused function
'superio_outb' [-Werror,-Wunused-function]
static inline void superio_outb(int sio_cip, int reg, int val)
^
This function is not used so remove it.

Signed-off-by: Tom Rix <[email protected]>
---
drivers/hwmon/vt1211.c | 6 ------
1 file changed, 6 deletions(-)

diff --git a/drivers/hwmon/vt1211.c b/drivers/hwmon/vt1211.c
index 4a5e911d26eb..fcd4be7a5a85 100644
--- a/drivers/hwmon/vt1211.c
+++ b/drivers/hwmon/vt1211.c
@@ -195,12 +195,6 @@ struct vt1211_data {
/* VT1211 logical device numbers */
#define SIO_VT1211_LDN_HWMON 0x0b /* HW monitor */

-static inline void superio_outb(int sio_cip, int reg, int val)
-{
- outb(reg, sio_cip);
- outb(val, sio_cip + 1);
-}
-
static inline int superio_inb(int sio_cip, int reg)
{
outb(reg, sio_cip);
--
2.27.0


2023-03-24 06:43:56

by Juerg Haefliger

[permalink] [raw]
Subject: Re: [PATCH] hwmon: remove unused superio_outb function






------- Original Message -------
On Thursday, March 23rd, 2023 at 22:15, Tom Rix <[email protected]> wrote:


>
>
> clang with W=1 reports
> drivers/hwmon/vt1211.c:198:20: error: unused function
> 'superio_outb' [-Werror,-Wunused-function]
> static inline void superio_outb(int sio_cip, int reg, int val)
> ^
> This function is not used so remove it.
>
> Signed-off-by: Tom Rix [email protected]

Looks good.

Acked-by: Juerg Haefliger <[email protected]>

...Juerg


> ---
> drivers/hwmon/vt1211.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/drivers/hwmon/vt1211.c b/drivers/hwmon/vt1211.c
> index 4a5e911d26eb..fcd4be7a5a85 100644
> --- a/drivers/hwmon/vt1211.c
> +++ b/drivers/hwmon/vt1211.c
> @@ -195,12 +195,6 @@ struct vt1211_data {
> /* VT1211 logical device numbers /
> #define SIO_VT1211_LDN_HWMON 0x0b / HW monitor */
>
> -static inline void superio_outb(int sio_cip, int reg, int val)
> -{
> - outb(reg, sio_cip);
> - outb(val, sio_cip + 1);
> -}
> -
> static inline int superio_inb(int sio_cip, int reg)
> {
> outb(reg, sio_cip);
> --
> 2.27.0

2023-03-25 13:54:05

by Guenter Roeck

[permalink] [raw]
Subject: Re: [PATCH] hwmon: remove unused superio_outb function

On Thu, Mar 23, 2023 at 05:15:35PM -0400, Tom Rix wrote:
> clang with W=1 reports
> drivers/hwmon/vt1211.c:198:20: error: unused function
> 'superio_outb' [-Werror,-Wunused-function]
> static inline void superio_outb(int sio_cip, int reg, int val)
> ^
> This function is not used so remove it.
>
> Signed-off-by: Tom Rix <[email protected]>
> Acked-by: Juerg Haefliger <[email protected]>

Applied.

Thanks,
Guenter