All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] lockd: Make two symbols static
@ 2019-05-28  9:06 YueHaibing
  2019-05-28 10:49 ` Benjamin Coddington
  0 siblings, 1 reply; 4+ messages in thread
From: YueHaibing @ 2019-05-28  9:06 UTC (permalink / raw)
  To: bfields, jlayton, trond.myklebust, anna.schumaker
  Cc: linux-kernel, linux-nfs, YueHaibing

Fix sparse warnings:

fs/lockd/clntproc.c:57:6: warning: symbol 'nlmclnt_put_lockowner' was not declared. Should it be static?
fs/lockd/svclock.c:409:35: warning: symbol 'nlmsvc_lock_ops' was not declared. Should it be static?

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 fs/lockd/clntproc.c | 2 +-
 fs/lockd/svclock.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
index 0ff8ad4..b11f2af 100644
--- a/fs/lockd/clntproc.c
+++ b/fs/lockd/clntproc.c
@@ -54,7 +54,7 @@ nlmclnt_get_lockowner(struct nlm_lockowner *lockowner)
 	return lockowner;
 }
 
-void nlmclnt_put_lockowner(struct nlm_lockowner *lockowner)
+static void nlmclnt_put_lockowner(struct nlm_lockowner *lockowner)
 {
 	if (!refcount_dec_and_lock(&lockowner->count, &lockowner->host->h_lock))
 		return;
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
index 5f9f19b..61d3cc2 100644
--- a/fs/lockd/svclock.c
+++ b/fs/lockd/svclock.c
@@ -406,7 +406,7 @@ static void nlmsvc_locks_release_private(struct file_lock *fl)
 	nlmsvc_put_lockowner((struct nlm_lockowner *)fl->fl_owner);
 }
 
-const struct file_lock_operations nlmsvc_lock_ops = {
+static const struct file_lock_operations nlmsvc_lock_ops = {
 	.fl_copy_lock = nlmsvc_locks_copy_lock,
 	.fl_release_private = nlmsvc_locks_release_private,
 };
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] lockd: Make two symbols static
  2019-05-28  9:06 [PATCH -next] lockd: Make two symbols static YueHaibing
@ 2019-05-28 10:49 ` Benjamin Coddington
  2019-05-28 15:13   ` J. Bruce Fields
  0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Coddington @ 2019-05-28 10:49 UTC (permalink / raw)
  To: YueHaibing, bfields
  Cc: jlayton, trond.myklebust, anna.schumaker, linux-kernel, linux-nfs

Maintainers, what's the best thing to do here: fold these into another 
patch version and post it (add attribution)?  Add it as another patch at 
the end of the series?

I have learned my lesson: add sparse to my workflow.

Ben

On 28 May 2019, at 5:06, YueHaibing wrote:

> Fix sparse warnings:
>
> fs/lockd/clntproc.c:57:6: warning: symbol 'nlmclnt_put_lockowner' was 
> not declared. Should it be static?
> fs/lockd/svclock.c:409:35: warning: symbol 'nlmsvc_lock_ops' was not 
> declared. Should it be static?
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  fs/lockd/clntproc.c | 2 +-
>  fs/lockd/svclock.c  | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
> index 0ff8ad4..b11f2af 100644
> --- a/fs/lockd/clntproc.c
> +++ b/fs/lockd/clntproc.c
> @@ -54,7 +54,7 @@ nlmclnt_get_lockowner(struct nlm_lockowner 
> *lockowner)
>  	return lockowner;
>  }
>
> -void nlmclnt_put_lockowner(struct nlm_lockowner *lockowner)
> +static void nlmclnt_put_lockowner(struct nlm_lockowner *lockowner)
>  {
>  	if (!refcount_dec_and_lock(&lockowner->count, 
> &lockowner->host->h_lock))
>  		return;
> diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
> index 5f9f19b..61d3cc2 100644
> --- a/fs/lockd/svclock.c
> +++ b/fs/lockd/svclock.c
> @@ -406,7 +406,7 @@ static void nlmsvc_locks_release_private(struct 
> file_lock *fl)
>  	nlmsvc_put_lockowner((struct nlm_lockowner *)fl->fl_owner);
>  }
>
> -const struct file_lock_operations nlmsvc_lock_ops = {
> +static const struct file_lock_operations nlmsvc_lock_ops = {
>  	.fl_copy_lock = nlmsvc_locks_copy_lock,
>  	.fl_release_private = nlmsvc_locks_release_private,
>  };
> -- 
> 2.7.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] lockd: Make two symbols static
  2019-05-28 10:49 ` Benjamin Coddington
@ 2019-05-28 15:13   ` J. Bruce Fields
  2019-05-28 15:19     ` Chuck Lever
  0 siblings, 1 reply; 4+ messages in thread
From: J. Bruce Fields @ 2019-05-28 15:13 UTC (permalink / raw)
  To: Benjamin Coddington
  Cc: YueHaibing, jlayton, trond.myklebust, anna.schumaker,
	linux-kernel, linux-nfs

On Tue, May 28, 2019 at 06:49:13AM -0400, Benjamin Coddington wrote:
> Maintainers, what's the best thing to do here: fold these into
> another patch version and post it (add attribution)?  Add it as
> another patch at the end of the series?

Either would be fine.  Yeah, if it was folded in then we'd add a line
like

	[hulkci@huawei.com: make symbols static to fix sparse warnings]

But I'll probably just add it on to the end for now.  No need for you to
do anything.

> I have learned my lesson: add sparse to my workflow.

I dunno, I wonder if we're better off just leaving it to this CI bot.
It seems like a more efficient use of time overall than making every
contributor run it.

--b.

> Ben
> 
> On 28 May 2019, at 5:06, YueHaibing wrote:
> 
> >Fix sparse warnings:
> >
> >fs/lockd/clntproc.c:57:6: warning: symbol 'nlmclnt_put_lockowner'
> >was not declared. Should it be static?
> >fs/lockd/svclock.c:409:35: warning: symbol 'nlmsvc_lock_ops' was
> >not declared. Should it be static?
> >
> >Reported-by: Hulk Robot <hulkci@huawei.com>
> >Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> >---
> > fs/lockd/clntproc.c | 2 +-
> > fs/lockd/svclock.c  | 2 +-
> > 2 files changed, 2 insertions(+), 2 deletions(-)
> >
> >diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
> >index 0ff8ad4..b11f2af 100644
> >--- a/fs/lockd/clntproc.c
> >+++ b/fs/lockd/clntproc.c
> >@@ -54,7 +54,7 @@ nlmclnt_get_lockowner(struct nlm_lockowner
> >*lockowner)
> > 	return lockowner;
> > }
> >
> >-void nlmclnt_put_lockowner(struct nlm_lockowner *lockowner)
> >+static void nlmclnt_put_lockowner(struct nlm_lockowner *lockowner)
> > {
> > 	if (!refcount_dec_and_lock(&lockowner->count,
> >&lockowner->host->h_lock))
> > 		return;
> >diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
> >index 5f9f19b..61d3cc2 100644
> >--- a/fs/lockd/svclock.c
> >+++ b/fs/lockd/svclock.c
> >@@ -406,7 +406,7 @@ static void
> >nlmsvc_locks_release_private(struct file_lock *fl)
> > 	nlmsvc_put_lockowner((struct nlm_lockowner *)fl->fl_owner);
> > }
> >
> >-const struct file_lock_operations nlmsvc_lock_ops = {
> >+static const struct file_lock_operations nlmsvc_lock_ops = {
> > 	.fl_copy_lock = nlmsvc_locks_copy_lock,
> > 	.fl_release_private = nlmsvc_locks_release_private,
> > };
> >-- 
> >2.7.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] lockd: Make two symbols static
  2019-05-28 15:13   ` J. Bruce Fields
@ 2019-05-28 15:19     ` Chuck Lever
  0 siblings, 0 replies; 4+ messages in thread
From: Chuck Lever @ 2019-05-28 15:19 UTC (permalink / raw)
  To: Bruce Fields
  Cc: Benjamin Coddington, YueHaibing, jlayton, Trond Myklebust,
	Anna Schumaker, Linux Kernel Mailing List,
	Linux NFS Mailing List



> On May 28, 2019, at 11:13 AM, J. Bruce Fields <bfields@fieldses.org> wrote:
> 
> On Tue, May 28, 2019 at 06:49:13AM -0400, Benjamin Coddington wrote:
>> Maintainers, what's the best thing to do here: fold these into
>> another patch version and post it (add attribution)?  Add it as
>> another patch at the end of the series?
> 
> Either would be fine.  Yeah, if it was folded in then we'd add a line
> like
> 
> 	[hulkci@huawei.com: make symbols static to fix sparse warnings]
> 
> But I'll probably just add it on to the end for now.  No need for you to
> do anything.
> 
>> I have learned my lesson: add sparse to my workflow.
> 
> I dunno, I wonder if we're better off just leaving it to this CI bot.
> It seems like a more efficient use of time overall than making every
> contributor run it.

Occasionally sparse can catch a real problem that breaks bisectability.
Better to do this kind of checking early, and ensure that you test those
sparse-fixed bits.


--
Chuck Lever




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-05-28 15:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-28  9:06 [PATCH -next] lockd: Make two symbols static YueHaibing
2019-05-28 10:49 ` Benjamin Coddington
2019-05-28 15:13   ` J. Bruce Fields
2019-05-28 15:19     ` Chuck Lever

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.