Skip to contentSkip to conversation

hwmon: (w83627ehf) Make DEVICE_ATTR_RO static

PATCH Applied [email protected] 2 participants 2 messages Jul 24, 2021 – Jul 25, 2021 Hardware monitoring

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwmon: (w83627ehf) Make DEVICE_ATTR_RO static

From: Armin Wolf <[email protected]>

Make DEVICE_ATTR_RO static to fix sparse warning:
warning: symbol 'dev_attr_cpu0_vid' was not declared. Should it be static?

---
 drivers/hwmon/w83627ehf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hwmon/w83627ehf.c +1 -1
index 3cea66c58c25..705a59663d42 100644
@@ -1081,7 +1081,7 @@ cpu0_vid_show(struct device *dev, struct device_attribute *attr, char *buf)
 	struct w83627ehf_data *data = dev_get_drvdata(dev);
 	return sprintf(buf, "%d\n", vid_from_reg(data->vid, data->vrm));
 }
-DEVICE_ATTR_RO(cpu0_vid);
+static DEVICE_ATTR_RO(cpu0_vid);
 
 
 /* Case open detection */

--
2.20.1

maintainer Applied
#1 lore raw
Quoted 6 lines · On Sat, Jul 24, 2021 at 05:48:17PM +0200, [email protected] wrote:

From: Armin Wolf <[email protected]>

Make DEVICE_ATTR_RO static to fix sparse warning:
warning: symbol 'dev_attr_cpu0_vid' was not declared. Should it be static?

Applied.

Thanks,
Guenter

Quoted 20 lines
---
 drivers/hwmon/w83627ehf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.20.1

drivers/hwmon/w83627ehf.c +1 -1
index 3cea66c58c25..705a59663d42 100644
@@ -1081,7 +1081,7 @@ cpu0_vid_show(struct device *dev, struct device_attribute *attr, char *buf)
 	struct w83627ehf_data *data = dev_get_drvdata(dev);
 	return sprintf(buf, "%d\n", vid_from_reg(data->vid, data->vrm));
 }
-DEVICE_ATTR_RO(cpu0_vid);
+static DEVICE_ATTR_RO(cpu0_vid);
 
 
 /* Case open detection */