diff mbox series

hwmon: (bt1-pvt) Mark is_visible functions static

Message ID 20200608142426.46955-1-linux@roeck-us.net
State Accepted
Headers show
Series hwmon: (bt1-pvt) Mark is_visible functions static | expand

Commit Message

Guenter Roeck June 8, 2020, 2:24 p.m. UTC
0-day reports:

drivers/hwmon/bt1-pvt.c:303:16: warning:
	no previous declaration for 'pvt_limit_is_visible'
drivers/hwmon/bt1-pvt.c:308:16: warning:
	no previous declaration for 'pvt_alarm_is_visible'

Declare both functions static.

Reported-by: kernel test robot <lkp@intel.com>
Fixes: 87976ce2825d("hwmon: Add Baikal-T1 PVT sensor driver")
Cc: Serge Semin <Sergey.Semin@baikalelectronics.ru>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/hwmon/bt1-pvt.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Serge Semin June 9, 2020, 11:49 a.m. UTC | #1
On Mon, Jun 08, 2020 at 07:24:26AM -0700, Guenter Roeck wrote:
> 0-day reports:
> 
> drivers/hwmon/bt1-pvt.c:303:16: warning:
> 	no previous declaration for 'pvt_limit_is_visible'
> drivers/hwmon/bt1-pvt.c:308:16: warning:
> 	no previous declaration for 'pvt_alarm_is_visible'
> 
> Declare both functions static.

Seems reasonable. Thanks.

Reviewed-by: Serge Semin <fancer.lancer@gmail.com>

> 
> Reported-by: kernel test robot <lkp@intel.com>
> Fixes: 87976ce2825d("hwmon: Add Baikal-T1 PVT sensor driver")
> Cc: Serge Semin <Sergey.Semin@baikalelectronics.ru>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>  drivers/hwmon/bt1-pvt.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/hwmon/bt1-pvt.c b/drivers/hwmon/bt1-pvt.c
> index 8709b3f54086..94698cae0497 100644
> --- a/drivers/hwmon/bt1-pvt.c
> +++ b/drivers/hwmon/bt1-pvt.c
> @@ -300,12 +300,12 @@ static irqreturn_t pvt_soft_isr(int irq, void *data)
>  	return IRQ_HANDLED;
>  }
>  
> -inline umode_t pvt_limit_is_visible(enum pvt_sensor_type type)
> +static inline umode_t pvt_limit_is_visible(enum pvt_sensor_type type)
>  {
>  	return 0644;
>  }
>  
> -inline umode_t pvt_alarm_is_visible(enum pvt_sensor_type type)
> +static inline umode_t pvt_alarm_is_visible(enum pvt_sensor_type type)
>  {
>  	return 0444;
>  }
> @@ -462,12 +462,12 @@ static irqreturn_t pvt_hard_isr(int irq, void *data)
>  
>  #define pvt_soft_isr NULL
>  
> -inline umode_t pvt_limit_is_visible(enum pvt_sensor_type type)
> +static inline umode_t pvt_limit_is_visible(enum pvt_sensor_type type)
>  {
>  	return 0;
>  }
>  
> -inline umode_t pvt_alarm_is_visible(enum pvt_sensor_type type)
> +static inline umode_t pvt_alarm_is_visible(enum pvt_sensor_type type)
>  {
>  	return 0;
>  }
> -- 
> 2.17.1
>
diff mbox series

Patch

diff --git a/drivers/hwmon/bt1-pvt.c b/drivers/hwmon/bt1-pvt.c
index 8709b3f54086..94698cae0497 100644
--- a/drivers/hwmon/bt1-pvt.c
+++ b/drivers/hwmon/bt1-pvt.c
@@ -300,12 +300,12 @@  static irqreturn_t pvt_soft_isr(int irq, void *data)
 	return IRQ_HANDLED;
 }
 
-inline umode_t pvt_limit_is_visible(enum pvt_sensor_type type)
+static inline umode_t pvt_limit_is_visible(enum pvt_sensor_type type)
 {
 	return 0644;
 }
 
-inline umode_t pvt_alarm_is_visible(enum pvt_sensor_type type)
+static inline umode_t pvt_alarm_is_visible(enum pvt_sensor_type type)
 {
 	return 0444;
 }
@@ -462,12 +462,12 @@  static irqreturn_t pvt_hard_isr(int irq, void *data)
 
 #define pvt_soft_isr NULL
 
-inline umode_t pvt_limit_is_visible(enum pvt_sensor_type type)
+static inline umode_t pvt_limit_is_visible(enum pvt_sensor_type type)
 {
 	return 0;
 }
 
-inline umode_t pvt_alarm_is_visible(enum pvt_sensor_type type)
+static inline umode_t pvt_alarm_is_visible(enum pvt_sensor_type type)
 {
 	return 0;
 }