[PATCH 05/11] staging: kpc2000: declare all kpc_uio_class device attributes as static.

Jeremy Sowden jeremy at azazel.net
Thu May 16 20:04:05 UTC 2019


The definitions are only used to populate the kpc_uio_class_attrs
attribute array, so declare them as static.

Fixes the following sparse warnings:

  drivers/staging/kpc2000/kpc2000/cell_probe.c:220:1: warning: symbol 'dev_attr_offset' was not declared. Should it be static?
  drivers/staging/kpc2000/kpc2000/cell_probe.c:221:1: warning: symbol 'dev_attr_size' was not declared. Should it be static?
  drivers/staging/kpc2000/kpc2000/cell_probe.c:222:1: warning: symbol 'dev_attr_type' was not declared. Should it be static?
  drivers/staging/kpc2000/kpc2000/cell_probe.c:223:1: warning: symbol 'dev_attr_s2c_dma' was not declared. Should it be static?
  drivers/staging/kpc2000/kpc2000/cell_probe.c:224:1: warning: symbol 'dev_attr_c2s_dma' was not declared. Should it be static?
  drivers/staging/kpc2000/kpc2000/cell_probe.c:225:1: warning: symbol 'dev_attr_irq_count' was not declared. Should it be static?
  drivers/staging/kpc2000/kpc2000/cell_probe.c:226:1: warning: symbol 'dev_attr_irq_base_num' was not declared. Should it be static?
  drivers/staging/kpc2000/kpc2000/cell_probe.c:227:1: warning: symbol 'dev_attr_core_num' was not declared. Should it be static?

Signed-off-by: Jeremy Sowden <jeremy at azazel.net>
---
 drivers/staging/kpc2000/kpc2000/cell_probe.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/kpc2000/kpc2000/cell_probe.c b/drivers/staging/kpc2000/kpc2000/cell_probe.c
index 38c3738209a7..4a1fec7f563b 100644
--- a/drivers/staging/kpc2000/kpc2000/cell_probe.c
+++ b/drivers/staging/kpc2000/kpc2000/cell_probe.c
@@ -217,14 +217,14 @@ static ssize_t core_num_show(struct device *dev, struct device_attribute *attr,
 	return scnprintf(buf, PAGE_SIZE, "%u\n", kudev->core_num);
 }
 
-DEVICE_ATTR_RO(offset);
-DEVICE_ATTR_RO(size);
-DEVICE_ATTR_RO(type);
-DEVICE_ATTR_RO(s2c_dma);
-DEVICE_ATTR_RO(c2s_dma);
-DEVICE_ATTR_RO(irq_count);
-DEVICE_ATTR_RO(irq_base_num);
-DEVICE_ATTR_RO(core_num);
+static DEVICE_ATTR_RO(offset);
+static DEVICE_ATTR_RO(size);
+static DEVICE_ATTR_RO(type);
+static DEVICE_ATTR_RO(s2c_dma);
+static DEVICE_ATTR_RO(c2s_dma);
+static DEVICE_ATTR_RO(irq_count);
+static DEVICE_ATTR_RO(irq_base_num);
+static DEVICE_ATTR_RO(core_num);
 
 struct attribute *kpc_uio_class_attrs[] = {
 	&dev_attr_offset.attr,
-- 
2.20.1



More information about the devel mailing list