Message ID | 20240819115944.3884827-1-ruanjinjie@huawei.com |
---|---|
State | New |
Headers | show |
Series | [-next,1/8] dax/bus.c: Make dax_region_rwsem and dax_dev_rwsem static | expand |
diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index fde29e0ad68b..e783e14a99b2 100644 --- a/drivers/dax/bus.c +++ b/drivers/dax/bus.c @@ -16,13 +16,13 @@ static DEFINE_MUTEX(dax_bus_lock); * All changes to the dax region configuration occur with this lock held * for write. */ -DECLARE_RWSEM(dax_region_rwsem); +static DECLARE_RWSEM(dax_region_rwsem); /* * All changes to the dax device configuration occur with this lock held * for write. */ -DECLARE_RWSEM(dax_dev_rwsem); +static DECLARE_RWSEM(dax_dev_rwsem); #define DAX_NAME_LEN 30 struct dax_id {
The sparse tool complains as follows: drivers/dax/bus.c:19:1: warning: symbol 'dax_region_rwsem' was not declared. Should it be static? drivers/dax/bus.c:25:1: warning: symbol 'dax_dev_rwsem' was not declared. Should it be static? These symbols are not used outside bus.c, so marks them static. Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> --- drivers/dax/bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)