ceph: make ceph_netfs_read_ops static
authorWei Yongjun <weiyongjun1@huawei.com>
Fri, 14 May 2021 06:39:53 +0000 (06:39 +0000)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 28 Jun 2021 21:49:24 +0000 (23:49 +0200)
The sparse tool complains as follows:

fs/ceph/addr.c:316:37: warning:
 symbol 'ceph_netfs_read_ops' was not declared. Should it be static?

This symbol is not used outside of addr.c, so mark it static.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/addr.c

index 998dc4dfdc6b18a832c45e06821e2de56ff5f562..9c17b3a308801f9d094c615387ed2b70178d13ab 100644 (file)
@@ -305,7 +305,7 @@ static void ceph_readahead_cleanup(struct address_space *mapping, void *priv)
                ceph_put_cap_refs(ci, got);
 }
 
-const struct netfs_read_request_ops ceph_netfs_read_ops = {
+static const struct netfs_read_request_ops ceph_netfs_read_ops = {
        .init_rreq              = ceph_init_rreq,
        .is_cache_enabled       = ceph_is_cache_enabled,
        .begin_cache_operation  = ceph_begin_cache_operation,