All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Yongjun <weiyongjun1@huawei.com>
To: <weiyongjun1@huawei.com>, NeilBrown <neilb@suse.de>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	Chuck Lever <chuck.lever@oracle.com>
Cc: <linux-nfs@vger.kernel.org>, <kernel-janitors@vger.kernel.org>,
	Hulk Robot <hulkci@huawei.com>
Subject: [PATCH -next] NFSD: make symbol 'nfsd_notifier_lock' static
Date: Tue, 30 Nov 2021 11:34:36 +0000	[thread overview]
Message-ID: <20211130113436.1770168-1-weiyongjun1@huawei.com> (raw)

The sparse tool complains as follows:

fs/nfsd/nfssvc.c:437:1: warning:
 symbol 'nfsd_notifier_lock' was not declared. Should it be static?

This symbol is not used outside of nfssvc.c, so marks it static.

Fixes: 6ac25fbcbde9 ("NFSD: simplify locking for network notifier.")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 fs/nfsd/nfssvc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 070525fbc1ad..14c1ef6f8cc7 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -434,7 +434,7 @@ static void nfsd_shutdown_net(struct net *net)
 	nfsd_shutdown_generic();
 }
 
-DEFINE_SPINLOCK(nfsd_notifier_lock);
+static DEFINE_SPINLOCK(nfsd_notifier_lock);
 static int nfsd_inetaddr_event(struct notifier_block *this, unsigned long event,
 	void *ptr)
 {


             reply	other threads:[~2021-11-30 11:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 11:34 Wei Yongjun [this message]
2021-11-30 20:19 ` [PATCH -next] NFSD: make symbol 'nfsd_notifier_lock' static Chuck Lever III
2021-12-03 11:25   ` Dan Carpenter
2021-12-03 15:17     ` Chuck Lever III
2021-12-03 15:19       ` Bruce Fields
2021-12-03 15:28         ` Chuck Lever III

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211130113436.1770168-1-weiyongjun1@huawei.com \
    --to=weiyongjun1@huawei.com \
    --cc=bfields@fieldses.org \
    --cc=chuck.lever@oracle.com \
    --cc=hulkci@huawei.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.