Skip to contentSkip to conversation

nvdimm: make security_show static

PATCH In review Ben Dooks 2 participants 2 messages Jun 16, 2023 libnvdimm: non-volatile memory device

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 nvdimm: make security_show static

The security_show function is not used outsid of drivers/nvdimm/dimm_devs.c and the attribute it is for is also already static. Silence the sparse warning for this not being declared by making it static. Fixes:

drivers/nvdimm/dimm_devs.c:352:9: warning: symbol 'security_show' was not declared. Should it be static?

---
 drivers/nvdimm/dimm_devs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/nvdimm/dimm_devs.c +2 -2
index 957f7c3d17ba..1273873582be 100644
@@ -349,8 +349,8 @@ static ssize_t available_slots_show(struct device *dev,
 }
 static DEVICE_ATTR_RO(available_slots);
 
-ssize_t security_show(struct device *dev,
-		struct device_attribute *attr, char *buf)
+static ssize_t security_show(struct device *dev,
+			     struct device_attribute *attr, char *buf)
 {
 	struct nvdimm *nvdimm = to_nvdimm(dev);
 
Signature · 1 line
2.39.2
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 1 line · Ben Dooks

The security_show function is not used outsid of drivers/nvdimm/dimm_devs.c

s/outsid/outside/

Quoted 6 lines

and the attribute it is for is also already static. Silence the sparse warning for this not being declared by making it static. Fixes:

drivers/nvdimm/dimm_devs.c:352:9: warning: symbol 'security_show' was not declared. Should it be static?

Quoted 19 lines
---
  drivers/nvdimm/dimm_devs.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/nvdimm/dimm_devs.c +2 -2
index 957f7c3d17ba..1273873582be 100644
@@ -349,8 +349,8 @@ static ssize_t available_slots_show(struct device *dev,
  }
  static DEVICE_ATTR_RO(available_slots);
 
-ssize_t security_show(struct device *dev,
-		struct device_attribute *attr, char *buf)
+static ssize_t security_show(struct device *dev,
+			     struct device_attribute *attr, char *buf)
  {
  	struct nvdimm *nvdimm = to_nvdimm(dev);