summaryrefslogtreecommitdiffstats
path: root/drivers/base/node.c
diff options
context:
space:
mode:
authorRuiqi Gong <gongruiqi1@huawei.com>2021-05-14 04:05:48 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-05-21 22:04:58 +0200
commitfd03c075e362edc2ad637dfb5b945d304f80efe5 (patch)
tree17052f2992735f58003a8730d6294d00f8ea97c4 /drivers/base/node.c
parentdebugfs: remove return value of debugfs_create_ulong() (diff)
downloadlinux-fd03c075e362edc2ad637dfb5b945d304f80efe5.tar.xz
linux-fd03c075e362edc2ad637dfb5b945d304f80efe5.zip
drivers/base/node.c: make CACHE_ATTR define static DEVICE_ATTR_RO
Mark DEVICE_ATTR_RO(name) in CACHE_ATTR(name, fmt)'s definition as static to fix the following Sparse tool reports: drivers/base/node.c:239:1: warning: symbol 'dev_attr_line_size' was not declared. Should it be static? drivers/base/node.c:240:1: warning: symbol 'dev_attr_indexing' was not declared. Should it be static? Where dev_attr_{line_size,indexing} are generated by CACHE_ATTR's expansion. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Ruiqi Gong <gongruiqi1@huawei.com> Link: https://lore.kernel.org/r/20210514020548.32483-1-gongruiqi1@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/node.c')
-rw-r--r--drivers/base/node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/node.c b/drivers/base/node.c
index 2c36f61d30bc..6d0210357da3 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -233,7 +233,7 @@ static ssize_t name##_show(struct device *dev, \
return sysfs_emit(buf, fmt "\n", \
to_cache_info(dev)->cache_attrs.name); \
} \
-DEVICE_ATTR_RO(name);
+static DEVICE_ATTR_RO(name);
CACHE_ATTR(size, "%llu")
CACHE_ATTR(line_size, "%u")