Skip to content
Commit fd03c075 authored by Ruiqi Gong's avatar Ruiqi Gong Committed by Greg Kroah-Hartman
Browse files

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: default avatarHulk Robot <hulkci@huawei.com>
Signed-off-by: default avatarRuiqi Gong <gongruiqi1@huawei.com>
Link: https://lore.kernel.org/r/20210514020548.32483-1-gongruiqi1@huawei.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fb05b14c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment