public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Chen Zhou <chenzhou10@huawei.com>
Cc: jdelvare@suse.com, linux-hwmon@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [-next] hwmon: (w83627ehf) make sensor_dev_attr_##_name variables static
Date: Thu, 12 Dec 2019 22:06:09 -0800	[thread overview]
Message-ID: <20191213060609.GA20673@roeck-us.net> (raw)
In-Reply-To: <20191213015605.172472-1-chenzhou10@huawei.com>

On Fri, Dec 13, 2019 at 09:56:05AM +0800, Chen Zhou wrote:
> Fix sparse warning:
> 
> drivers/hwmon/w83627ehf.c:1202:1: warning: symbol 'sensor_dev_attr_pwm1_target' was not declared. Should it be static?

...

> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Chen Zhou <chenzhou10@huawei.com>

Applied (though I removed most of the log messages - there no point of
having all of them in the commit message).

Guenter

> ---
>  drivers/hwmon/w83627ehf.c | 56 +++++++++++++++++++++++------------------------
>  1 file changed, 28 insertions(+), 28 deletions(-)
> 
> diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
> index 207cc74..0a13f6b 100644
> --- a/drivers/hwmon/w83627ehf.c
> +++ b/drivers/hwmon/w83627ehf.c
> @@ -1199,22 +1199,22 @@ store_tolerance(struct device *dev, struct device_attribute *attr,
>  	return count;
>  }
>  
> -SENSOR_DEVICE_ATTR(pwm1_target, 0644, show_target_temp,
> +static SENSOR_DEVICE_ATTR(pwm1_target, 0644, show_target_temp,
>  	    store_target_temp, 0);
> -SENSOR_DEVICE_ATTR(pwm2_target, 0644, show_target_temp,
> +static SENSOR_DEVICE_ATTR(pwm2_target, 0644, show_target_temp,
>  	    store_target_temp, 1);
> -SENSOR_DEVICE_ATTR(pwm3_target, 0644, show_target_temp,
> +static SENSOR_DEVICE_ATTR(pwm3_target, 0644, show_target_temp,
>  	    store_target_temp, 2);
> -SENSOR_DEVICE_ATTR(pwm4_target, 0644, show_target_temp,
> +static SENSOR_DEVICE_ATTR(pwm4_target, 0644, show_target_temp,
>  	    store_target_temp, 3);
>  
> -SENSOR_DEVICE_ATTR(pwm1_tolerance, 0644, show_tolerance,
> +static SENSOR_DEVICE_ATTR(pwm1_tolerance, 0644, show_tolerance,
>  	    store_tolerance, 0);
> -SENSOR_DEVICE_ATTR(pwm2_tolerance, 0644, show_tolerance,
> +static SENSOR_DEVICE_ATTR(pwm2_tolerance, 0644, show_tolerance,
>  	    store_tolerance, 1);
> -SENSOR_DEVICE_ATTR(pwm3_tolerance, 0644, show_tolerance,
> +static SENSOR_DEVICE_ATTR(pwm3_tolerance, 0644, show_tolerance,
>  	    store_tolerance, 2);
> -SENSOR_DEVICE_ATTR(pwm4_tolerance, 0644, show_tolerance,
> +static SENSOR_DEVICE_ATTR(pwm4_tolerance, 0644, show_tolerance,
>  	    store_tolerance, 3);
>  
>  /* Smart Fan registers */
> @@ -1291,35 +1291,35 @@ store_##reg(struct device *dev, struct device_attribute *attr, \
>  
>  fan_time_functions(fan_stop_time, FAN_STOP_TIME)
>  
> -SENSOR_DEVICE_ATTR(pwm4_stop_time, 0644, show_fan_stop_time,
> +static SENSOR_DEVICE_ATTR(pwm4_stop_time, 0644, show_fan_stop_time,
>  	    store_fan_stop_time, 3);
> -SENSOR_DEVICE_ATTR(pwm4_start_output, 0644, show_fan_start_output,
> +static SENSOR_DEVICE_ATTR(pwm4_start_output, 0644, show_fan_start_output,
>  	    store_fan_start_output, 3);
> -SENSOR_DEVICE_ATTR(pwm4_stop_output, 0644, show_fan_stop_output,
> +static SENSOR_DEVICE_ATTR(pwm4_stop_output, 0644, show_fan_stop_output,
>  	    store_fan_stop_output, 3);
> -SENSOR_DEVICE_ATTR(pwm4_max_output, 0644, show_fan_max_output,
> +static SENSOR_DEVICE_ATTR(pwm4_max_output, 0644, show_fan_max_output,
>  	    store_fan_max_output, 3);
> -SENSOR_DEVICE_ATTR(pwm4_step_output, 0644, show_fan_step_output,
> +static SENSOR_DEVICE_ATTR(pwm4_step_output, 0644, show_fan_step_output,
>  	    store_fan_step_output, 3);
>  
> -SENSOR_DEVICE_ATTR(pwm3_stop_time, 0644, show_fan_stop_time,
> +static SENSOR_DEVICE_ATTR(pwm3_stop_time, 0644, show_fan_stop_time,
>  	    store_fan_stop_time, 2);
> -SENSOR_DEVICE_ATTR(pwm3_start_output, 0644, show_fan_start_output,
> +static SENSOR_DEVICE_ATTR(pwm3_start_output, 0644, show_fan_start_output,
>  	    store_fan_start_output, 2);
> -SENSOR_DEVICE_ATTR(pwm3_stop_output, 0644, show_fan_stop_output,
> +static SENSOR_DEVICE_ATTR(pwm3_stop_output, 0644, show_fan_stop_output,
>  		    store_fan_stop_output, 2);
>  
> -SENSOR_DEVICE_ATTR(pwm1_stop_time, 0644, show_fan_stop_time,
> +static SENSOR_DEVICE_ATTR(pwm1_stop_time, 0644, show_fan_stop_time,
>  	    store_fan_stop_time, 0);
> -SENSOR_DEVICE_ATTR(pwm2_stop_time, 0644, show_fan_stop_time,
> +static SENSOR_DEVICE_ATTR(pwm2_stop_time, 0644, show_fan_stop_time,
>  	    store_fan_stop_time, 1);
> -SENSOR_DEVICE_ATTR(pwm1_start_output, 0644, show_fan_start_output,
> +static SENSOR_DEVICE_ATTR(pwm1_start_output, 0644, show_fan_start_output,
>  	    store_fan_start_output, 0);
> -SENSOR_DEVICE_ATTR(pwm2_start_output, 0644, show_fan_start_output,
> +static SENSOR_DEVICE_ATTR(pwm2_start_output, 0644, show_fan_start_output,
>  	    store_fan_start_output, 1);
> -SENSOR_DEVICE_ATTR(pwm1_stop_output, 0644, show_fan_stop_output,
> +static SENSOR_DEVICE_ATTR(pwm1_stop_output, 0644, show_fan_stop_output,
>  	    store_fan_stop_output, 0);
> -SENSOR_DEVICE_ATTR(pwm2_stop_output, 0644, show_fan_stop_output,
> +static SENSOR_DEVICE_ATTR(pwm2_stop_output, 0644, show_fan_stop_output,
>  	    store_fan_stop_output, 1);
>  
>  
> @@ -1327,17 +1327,17 @@ SENSOR_DEVICE_ATTR(pwm2_stop_output, 0644, show_fan_stop_output,
>   * pwm1 and pwm3 don't support max and step settings on all chips.
>   * Need to check support while generating/removing attribute files.
>   */
> -SENSOR_DEVICE_ATTR(pwm1_max_output, 0644, show_fan_max_output,
> +static SENSOR_DEVICE_ATTR(pwm1_max_output, 0644, show_fan_max_output,
>  	    store_fan_max_output, 0);
> -SENSOR_DEVICE_ATTR(pwm1_step_output, 0644, show_fan_step_output,
> +static SENSOR_DEVICE_ATTR(pwm1_step_output, 0644, show_fan_step_output,
>  	    store_fan_step_output, 0);
> -SENSOR_DEVICE_ATTR(pwm2_max_output, 0644, show_fan_max_output,
> +static SENSOR_DEVICE_ATTR(pwm2_max_output, 0644, show_fan_max_output,
>  	    store_fan_max_output, 1);
> -SENSOR_DEVICE_ATTR(pwm2_step_output, 0644, show_fan_step_output,
> +static SENSOR_DEVICE_ATTR(pwm2_step_output, 0644, show_fan_step_output,
>  	    store_fan_step_output, 1);
> -SENSOR_DEVICE_ATTR(pwm3_max_output, 0644, show_fan_max_output,
> +static SENSOR_DEVICE_ATTR(pwm3_max_output, 0644, show_fan_max_output,
>  	    store_fan_max_output, 2);
> -SENSOR_DEVICE_ATTR(pwm3_step_output, 0644, show_fan_step_output,
> +static SENSOR_DEVICE_ATTR(pwm3_step_output, 0644, show_fan_step_output,
>  	    store_fan_step_output, 2);
>  
>  static ssize_t

      reply	other threads:[~2019-12-13  6:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-13  1:56 [-next] hwmon: (w83627ehf) make sensor_dev_attr_##_name variables static Chen Zhou
2019-12-13  6:06 ` Guenter Roeck [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191213060609.GA20673@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=chenzhou10@huawei.com \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox