diff mbox

hwmon: (k10temp) Make function get_raw_temp static

Message ID 20180601133713.8817-1-colin.king@canonical.com (mailing list archive)
State Accepted
Headers show

Commit Message

Colin King June 1, 2018, 1:37 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

The function get_raw_temp is local to the source and does not need to
be in global scope, so make it static.

Cleans up sparse warning:
drivers/hwmon/k10temp.c:149:14: warning: symbol 'get_raw_temp' was not
declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/hwmon/k10temp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Guenter Roeck June 1, 2018, 4:09 p.m. UTC | #1
On Fri, Jun 01, 2018 at 02:37:13PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The function get_raw_temp is local to the source and does not need to
> be in global scope, so make it static.
> 
> Cleans up sparse warning:
> drivers/hwmon/k10temp.c:149:14: warning: symbol 'get_raw_temp' was not
> declared. Should it be static?
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

Thanks,
Guenter

> ---
>  drivers/hwmon/k10temp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
> index d3fae5a8e508..17c6460ae351 100644
> --- a/drivers/hwmon/k10temp.c
> +++ b/drivers/hwmon/k10temp.c
> @@ -146,7 +146,7 @@ static void read_tempreg_nb_f17(struct pci_dev *pdev, u32 *regval)
>  		     F17H_M01H_REPORTED_TEMP_CTRL_OFFSET, regval);
>  }
>  
> -unsigned int get_raw_temp(struct k10temp_data *data)
> +static unsigned int get_raw_temp(struct k10temp_data *data)
>  {
>  	unsigned int temp;
>  	u32 regval;
> -- 
> 2.17.0
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
index d3fae5a8e508..17c6460ae351 100644
--- a/drivers/hwmon/k10temp.c
+++ b/drivers/hwmon/k10temp.c
@@ -146,7 +146,7 @@  static void read_tempreg_nb_f17(struct pci_dev *pdev, u32 *regval)
 		     F17H_M01H_REPORTED_TEMP_CTRL_OFFSET, regval);
 }
 
-unsigned int get_raw_temp(struct k10temp_data *data)
+static unsigned int get_raw_temp(struct k10temp_data *data)
 {
 	unsigned int temp;
 	u32 regval;