diff mbox series

[v3,8/8] hwmon: (k10temp) Rename _data variable

Message ID 20240523-fix-smn-bad-read-v3-8-aa44c622de39@amd.com (mailing list archive)
State Handled Elsewhere
Headers show
Series Enhance AMD SMN Error Checking | expand

Commit Message

Yazen Ghannam May 23, 2024, 6:26 p.m. UTC
...to address the following warning:

drivers/hwmon/k10temp.c:273:47:
warning: declaration shadows a variable in the global scope [-Wshadow]
static umode_t k10temp_is_visible(const void *_data,
                                              ^
include/asm-generic/sections.h:36:13:
note: previous declaration is here
extern char _data[], _sdata[], _edata[];

No functional change is intended.

Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
---
 drivers/hwmon/k10temp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Guenter Roeck May 23, 2024, 7:32 p.m. UTC | #1
On 5/23/24 11:26, Yazen Ghannam wrote:
> ...to address the following warning:
> 
> drivers/hwmon/k10temp.c:273:47:
> warning: declaration shadows a variable in the global scope [-Wshadow]
> static umode_t k10temp_is_visible(const void *_data,
>                                                ^
> include/asm-generic/sections.h:36:13:
> note: previous declaration is here
> extern char _data[], _sdata[], _edata[];
> 
> No functional change is intended.
> 
> Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>

Acked-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   drivers/hwmon/k10temp.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
> index a2d203304533..543526bac042 100644
> --- a/drivers/hwmon/k10temp.c
> +++ b/drivers/hwmon/k10temp.c
> @@ -269,11 +269,11 @@ static int k10temp_read(struct device *dev, enum hwmon_sensor_types type,
>   	}
>   }
>   
> -static umode_t k10temp_is_visible(const void *_data,
> +static umode_t k10temp_is_visible(const void *drvdata,
>   				  enum hwmon_sensor_types type,
>   				  u32 attr, int channel)
>   {
> -	const struct k10temp_data *data = _data;
> +	const struct k10temp_data *data = drvdata;
>   	struct pci_dev *pdev = data->pdev;
>   	u32 reg;
>   
>
diff mbox series

Patch

diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
index a2d203304533..543526bac042 100644
--- a/drivers/hwmon/k10temp.c
+++ b/drivers/hwmon/k10temp.c
@@ -269,11 +269,11 @@  static int k10temp_read(struct device *dev, enum hwmon_sensor_types type,
 	}
 }
 
-static umode_t k10temp_is_visible(const void *_data,
+static umode_t k10temp_is_visible(const void *drvdata,
 				  enum hwmon_sensor_types type,
 				  u32 attr, int channel)
 {
-	const struct k10temp_data *data = _data;
+	const struct k10temp_data *data = drvdata;
 	struct pci_dev *pdev = data->pdev;
 	u32 reg;