diff mbox series

[-next] ceph: make symbol 'ceph_netfs_read_ops' static

Message ID 20210514063953.3242049-1-weiyongjun1@huawei.com
State New
Headers show
Series [-next] ceph: make symbol 'ceph_netfs_read_ops' static | expand

Commit Message

Wei Yongjun May 14, 2021, 6:39 a.m. UTC
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 marks it static.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 fs/ceph/addr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ilya Dryomov May 14, 2021, 8:53 a.m. UTC | #1
On Fri, May 14, 2021 at 8:30 AM Wei Yongjun <weiyongjun1@huawei.com> wrote:
>
> 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 marks it static.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  fs/ceph/addr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
> index c1570fada3d8..5dfd18d84a3b 100644
> --- a/fs/ceph/addr.c
> +++ b/fs/ceph/addr.c
> @@ -313,7 +313,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,
>

Applied.

Thanks,

                Ilya
diff mbox series

Patch

diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index c1570fada3d8..5dfd18d84a3b 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -313,7 +313,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,