rcu.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* kerneldoc warnings since commit 538fc2ee870a3 ("rcu: Introduce kfree_rcu() single-argument macro")
@ 2021-01-05  7:32 Lukas Bulwahn
  2021-01-05 13:14 ` Uladzislau Rezki
  0 siblings, 1 reply; 7+ messages in thread
From: Lukas Bulwahn @ 2021-01-05  7:32 UTC (permalink / raw)
  To: Uladzislau Rezki, Paul E. McKenney, Josh Triplett, rcu
  Cc: linux-doc, Linux Kernel Mailing List, Steven Rostedt,
	Mathieu Desnoyers, Lai Jiangshan, Joel Fernandes

Dear Uladzislau,

in commit 538fc2ee870a3 ("rcu: Introduce kfree_rcu() single-argument
macro"), you have refactored the kfree_rcu macro.

Since then, make htmldocs warns:

./include/linux/rcupdate.h:882: warning: Excess function parameter
'ptr' description in 'kfree_rcu'
./include/linux/rcupdate.h:882: warning: Excess function parameter
'rhf' description in 'kfree_rcu'

As you deleted the two arguments in the macro definition, kerneldoc
cannot resolve the argument names in the macro's kerneldoc
documentation anymore and warns about that.

Probably, it is best to just turn the formal kerneldoc references to
the two arguments, which are not used in the macro definition anymore,
simply into two informal references in the documentation.

Best regards,

Lukas

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

* Re: kerneldoc warnings since commit 538fc2ee870a3 ("rcu: Introduce kfree_rcu() single-argument macro")
  2021-01-05  7:32 kerneldoc warnings since commit 538fc2ee870a3 ("rcu: Introduce kfree_rcu() single-argument macro") Lukas Bulwahn
@ 2021-01-05 13:14 ` Uladzislau Rezki
  2021-01-05 14:03   ` Lukas Bulwahn
  2021-01-05 14:56   ` Paul E. McKenney
  0 siblings, 2 replies; 7+ messages in thread
From: Uladzislau Rezki @ 2021-01-05 13:14 UTC (permalink / raw)
  To: Lukas Bulwahn, Paul E. McKenney
  Cc: Uladzislau Rezki, Josh Triplett, rcu, linux-doc,
	Linux Kernel Mailing List, Steven Rostedt, Mathieu Desnoyers,
	Lai Jiangshan, Joel Fernandes

Dear, Lukas.

> Dear Uladzislau,
> 
> in commit 538fc2ee870a3 ("rcu: Introduce kfree_rcu() single-argument
> macro"), you have refactored the kfree_rcu macro.
> 
> Since then, make htmldocs warns:
> 
> ./include/linux/rcupdate.h:882: warning: Excess function parameter
> 'ptr' description in 'kfree_rcu'
> ./include/linux/rcupdate.h:882: warning: Excess function parameter
> 'rhf' description in 'kfree_rcu'
> 
> As you deleted the two arguments in the macro definition, kerneldoc
> cannot resolve the argument names in the macro's kerneldoc
> documentation anymore and warns about that.
> 
> Probably, it is best to just turn the formal kerneldoc references to
> the two arguments, which are not used in the macro definition anymore,
> simply into two informal references in the documentation.
> 
Thanks for your suggestion. I am not sure if htmldocs supports something
like "__maybe_unused", but tend to say that it does not. See below the
patch:

<snip>
From 65ecc7c58810c963c02e0596ce2e5758c54ef55d Mon Sep 17 00:00:00 2001
From: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
Date: Tue, 5 Jan 2021 13:23:30 +0100
Subject: [PATCH] rcu: fix kerneldoc warnings

After refactoring of the kfree_rcu(), it becomes possible to use
the macro with one or two arguments. From the other hand, in the
description there are two arguments in the macro definition expected.
That is why the "htmldocs" emits a warning about it:

<snip>
./include/linux/rcupdate.h:882: warning: Excess function parameter
'ptr' description in 'kfree_rcu'
./include/linux/rcupdate.h:882: warning: Excess function parameter
'rhf' description in 'kfree_rcu'
<snip>

Fix it by converting two parameters into informal references in the
macro description.

Fixes: 3d3d9ff077a9 ("rcu: Introduce kfree_rcu() single-argument macro")
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
---
 include/linux/rcupdate.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index ebd8dcca4997..e678ce7f5ca2 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -854,8 +854,8 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
 
 /**
  * kfree_rcu() - kfree an object after a grace period.
- * @ptr: pointer to kfree for both single- and double-argument invocations.
- * @rhf: the name of the struct rcu_head within the type of @ptr,
+ * ptr: pointer to kfree for both single- and double-argument invocations.
+ * rhf: the name of the struct rcu_head within the type of ptr,
  *       but only for double-argument invocations.
  *
  * Many rcu callbacks functions just call kfree() on the base structure.
-- 
2.20.1
<snip>

Paul, does it work for you?

Thanks!

--
Vlad Rezki

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

* Re: kerneldoc warnings since commit 538fc2ee870a3 ("rcu: Introduce kfree_rcu() single-argument macro")
  2021-01-05 13:14 ` Uladzislau Rezki
@ 2021-01-05 14:03   ` Lukas Bulwahn
  2021-01-05 14:56   ` Paul E. McKenney
  1 sibling, 0 replies; 7+ messages in thread
From: Lukas Bulwahn @ 2021-01-05 14:03 UTC (permalink / raw)
  To: Uladzislau Rezki
  Cc: Paul E. McKenney, Josh Triplett, rcu, linux-doc,
	Linux Kernel Mailing List, Steven Rostedt, Mathieu Desnoyers,
	Lai Jiangshan, Joel Fernandes

On Tue, Jan 5, 2021 at 2:14 PM Uladzislau Rezki <urezki@gmail.com> wrote:
>
> Dear, Lukas.
>
> > Dear Uladzislau,
> >
> > in commit 538fc2ee870a3 ("rcu: Introduce kfree_rcu() single-argument
> > macro"), you have refactored the kfree_rcu macro.
> >
> > Since then, make htmldocs warns:
> >
> > ./include/linux/rcupdate.h:882: warning: Excess function parameter
> > 'ptr' description in 'kfree_rcu'
> > ./include/linux/rcupdate.h:882: warning: Excess function parameter
> > 'rhf' description in 'kfree_rcu'
> >
> > As you deleted the two arguments in the macro definition, kerneldoc
> > cannot resolve the argument names in the macro's kerneldoc
> > documentation anymore and warns about that.
> >
> > Probably, it is best to just turn the formal kerneldoc references to
> > the two arguments, which are not used in the macro definition anymore,
> > simply into two informal references in the documentation.
> >
> Thanks for your suggestion. I am not sure if htmldocs supports something
> like "__maybe_unused", but tend to say that it does not. See below the
> patch:
>

I was thinking of a similar solution as you found here. That will probably do.

Lukas

> <snip>
> From 65ecc7c58810c963c02e0596ce2e5758c54ef55d Mon Sep 17 00:00:00 2001
> From: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
> Date: Tue, 5 Jan 2021 13:23:30 +0100
> Subject: [PATCH] rcu: fix kerneldoc warnings
>
> After refactoring of the kfree_rcu(), it becomes possible to use
> the macro with one or two arguments. From the other hand, in the
> description there are two arguments in the macro definition expected.
> That is why the "htmldocs" emits a warning about it:
>
> <snip>
> ./include/linux/rcupdate.h:882: warning: Excess function parameter
> 'ptr' description in 'kfree_rcu'
> ./include/linux/rcupdate.h:882: warning: Excess function parameter
> 'rhf' description in 'kfree_rcu'
> <snip>
>
> Fix it by converting two parameters into informal references in the
> macro description.
>
> Fixes: 3d3d9ff077a9 ("rcu: Introduce kfree_rcu() single-argument macro")
> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
> ---
>  include/linux/rcupdate.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
> index ebd8dcca4997..e678ce7f5ca2 100644
> --- a/include/linux/rcupdate.h
> +++ b/include/linux/rcupdate.h
> @@ -854,8 +854,8 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
>
>  /**
>   * kfree_rcu() - kfree an object after a grace period.
> - * @ptr: pointer to kfree for both single- and double-argument invocations.
> - * @rhf: the name of the struct rcu_head within the type of @ptr,
> + * ptr: pointer to kfree for both single- and double-argument invocations.
> + * rhf: the name of the struct rcu_head within the type of ptr,
>   *       but only for double-argument invocations.
>   *
>   * Many rcu callbacks functions just call kfree() on the base structure.
> --
> 2.20.1
> <snip>
>
> Paul, does it work for you?
>
> Thanks!
>
> --
> Vlad Rezki

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

* Re: kerneldoc warnings since commit 538fc2ee870a3 ("rcu: Introduce kfree_rcu() single-argument macro")
  2021-01-05 13:14 ` Uladzislau Rezki
  2021-01-05 14:03   ` Lukas Bulwahn
@ 2021-01-05 14:56   ` Paul E. McKenney
  2021-01-05 16:29     ` Uladzislau Rezki
  1 sibling, 1 reply; 7+ messages in thread
From: Paul E. McKenney @ 2021-01-05 14:56 UTC (permalink / raw)
  To: Uladzislau Rezki
  Cc: Lukas Bulwahn, Josh Triplett, rcu, linux-doc,
	Linux Kernel Mailing List, Steven Rostedt, Mathieu Desnoyers,
	Lai Jiangshan, Joel Fernandes

On Tue, Jan 05, 2021 at 02:14:41PM +0100, Uladzislau Rezki wrote:
> Dear, Lukas.
> 
> > Dear Uladzislau,
> > 
> > in commit 538fc2ee870a3 ("rcu: Introduce kfree_rcu() single-argument
> > macro"), you have refactored the kfree_rcu macro.
> > 
> > Since then, make htmldocs warns:
> > 
> > ./include/linux/rcupdate.h:882: warning: Excess function parameter
> > 'ptr' description in 'kfree_rcu'
> > ./include/linux/rcupdate.h:882: warning: Excess function parameter
> > 'rhf' description in 'kfree_rcu'
> > 
> > As you deleted the two arguments in the macro definition, kerneldoc
> > cannot resolve the argument names in the macro's kerneldoc
> > documentation anymore and warns about that.
> > 
> > Probably, it is best to just turn the formal kerneldoc references to
> > the two arguments, which are not used in the macro definition anymore,
> > simply into two informal references in the documentation.
> > 
> Thanks for your suggestion. I am not sure if htmldocs supports something
> like "__maybe_unused", but tend to say that it does not. See below the
> patch:
> 
> <snip>
> >From 65ecc7c58810c963c02e0596ce2e5758c54ef55d Mon Sep 17 00:00:00 2001
> From: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
> Date: Tue, 5 Jan 2021 13:23:30 +0100
> Subject: [PATCH] rcu: fix kerneldoc warnings
> 
> After refactoring of the kfree_rcu(), it becomes possible to use
> the macro with one or two arguments. From the other hand, in the
> description there are two arguments in the macro definition expected.
> That is why the "htmldocs" emits a warning about it:
> 
> <snip>
> ./include/linux/rcupdate.h:882: warning: Excess function parameter
> 'ptr' description in 'kfree_rcu'
> ./include/linux/rcupdate.h:882: warning: Excess function parameter
> 'rhf' description in 'kfree_rcu'
> <snip>
> 
> Fix it by converting two parameters into informal references in the
> macro description.
> 
> Fixes: 3d3d9ff077a9 ("rcu: Introduce kfree_rcu() single-argument macro")
> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
> ---
>  include/linux/rcupdate.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
> index ebd8dcca4997..e678ce7f5ca2 100644
> --- a/include/linux/rcupdate.h
> +++ b/include/linux/rcupdate.h
> @@ -854,8 +854,8 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
>  
>  /**
>   * kfree_rcu() - kfree an object after a grace period.
> - * @ptr: pointer to kfree for both single- and double-argument invocations.
> - * @rhf: the name of the struct rcu_head within the type of @ptr,
> + * ptr: pointer to kfree for both single- and double-argument invocations.
> + * rhf: the name of the struct rcu_head within the type of ptr,
>   *       but only for double-argument invocations.
>   *
>   * Many rcu callbacks functions just call kfree() on the base structure.
> -- 
> 2.20.1
> <snip>
> 
> Paul, does it work for you?

If it works for the documentation generation, then it works for me.  ;-)

							Thanx, Paul

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

* Re: kerneldoc warnings since commit 538fc2ee870a3 ("rcu: Introduce kfree_rcu() single-argument macro")
  2021-01-05 14:56   ` Paul E. McKenney
@ 2021-01-05 16:29     ` Uladzislau Rezki
  2021-01-07  7:28       ` Lukas Bulwahn
  0 siblings, 1 reply; 7+ messages in thread
From: Uladzislau Rezki @ 2021-01-05 16:29 UTC (permalink / raw)
  To: linux-doc
  Cc: Uladzislau Rezki, Lukas Bulwahn, Josh Triplett, rcu, linux-doc,
	Linux Kernel Mailing List, Steven Rostedt, Mathieu Desnoyers,
	Lai Jiangshan, Joel Fernandes

On Tue, Jan 05, 2021 at 06:56:59AM -0800, Paul E. McKenney wrote:
> On Tue, Jan 05, 2021 at 02:14:41PM +0100, Uladzislau Rezki wrote:
> > Dear, Lukas.
> > 
> > > Dear Uladzislau,
> > > 
> > > in commit 538fc2ee870a3 ("rcu: Introduce kfree_rcu() single-argument
> > > macro"), you have refactored the kfree_rcu macro.
> > > 
> > > Since then, make htmldocs warns:
> > > 
> > > ./include/linux/rcupdate.h:882: warning: Excess function parameter
> > > 'ptr' description in 'kfree_rcu'
> > > ./include/linux/rcupdate.h:882: warning: Excess function parameter
> > > 'rhf' description in 'kfree_rcu'
> > > 
> > > As you deleted the two arguments in the macro definition, kerneldoc
> > > cannot resolve the argument names in the macro's kerneldoc
> > > documentation anymore and warns about that.
> > > 
> > > Probably, it is best to just turn the formal kerneldoc references to
> > > the two arguments, which are not used in the macro definition anymore,
> > > simply into two informal references in the documentation.
> > > 
> > Thanks for your suggestion. I am not sure if htmldocs supports something
> > like "__maybe_unused", but tend to say that it does not. See below the
> > patch:
> > 
> > <snip>
> > >From 65ecc7c58810c963c02e0596ce2e5758c54ef55d Mon Sep 17 00:00:00 2001
> > From: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
> > Date: Tue, 5 Jan 2021 13:23:30 +0100
> > Subject: [PATCH] rcu: fix kerneldoc warnings
> > 
> > After refactoring of the kfree_rcu(), it becomes possible to use
> > the macro with one or two arguments. From the other hand, in the
> > description there are two arguments in the macro definition expected.
> > That is why the "htmldocs" emits a warning about it:
> > 
> > <snip>
> > ./include/linux/rcupdate.h:882: warning: Excess function parameter
> > 'ptr' description in 'kfree_rcu'
> > ./include/linux/rcupdate.h:882: warning: Excess function parameter
> > 'rhf' description in 'kfree_rcu'
> > <snip>
> > 
> > Fix it by converting two parameters into informal references in the
> > macro description.
> > 
> > Fixes: 3d3d9ff077a9 ("rcu: Introduce kfree_rcu() single-argument macro")
> > Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
> > ---
> >  include/linux/rcupdate.h | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
> > index ebd8dcca4997..e678ce7f5ca2 100644
> > --- a/include/linux/rcupdate.h
> > +++ b/include/linux/rcupdate.h
> > @@ -854,8 +854,8 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
> >  
> >  /**
> >   * kfree_rcu() - kfree an object after a grace period.
> > - * @ptr: pointer to kfree for both single- and double-argument invocations.
> > - * @rhf: the name of the struct rcu_head within the type of @ptr,
> > + * ptr: pointer to kfree for both single- and double-argument invocations.
> > + * rhf: the name of the struct rcu_head within the type of ptr,
> >   *       but only for double-argument invocations.
> >   *
> >   * Many rcu callbacks functions just call kfree() on the base structure.
> > -- 
> > 2.20.1
> > <snip>
> > 
> > Paul, does it work for you?
> 
> If it works for the documentation generation, then it works for me.  ;-)
> 
OK. Then we need the patch to be reviewed by the documentation generation :)

Dear, linux-doc folk!

Could you please review the patch that is in question?

Thank you in advance.

--
Vlad Rezki

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

* Re: kerneldoc warnings since commit 538fc2ee870a3 ("rcu: Introduce kfree_rcu() single-argument macro")
  2021-01-05 16:29     ` Uladzislau Rezki
@ 2021-01-07  7:28       ` Lukas Bulwahn
  2021-01-07 13:00         ` Uladzislau Rezki
  0 siblings, 1 reply; 7+ messages in thread
From: Lukas Bulwahn @ 2021-01-07  7:28 UTC (permalink / raw)
  To: Uladzislau Rezki
  Cc: linux-doc, Josh Triplett, rcu, Linux Kernel Mailing List,
	Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan, Joel Fernandes

On Tue, Jan 5, 2021 at 5:29 PM Uladzislau Rezki <urezki@gmail.com> wrote:
>
> On Tue, Jan 05, 2021 at 06:56:59AM -0800, Paul E. McKenney wrote:
> > On Tue, Jan 05, 2021 at 02:14:41PM +0100, Uladzislau Rezki wrote:
> > > Dear, Lukas.
> > >
> > > > Dear Uladzislau,
> > > >
> > > > in commit 538fc2ee870a3 ("rcu: Introduce kfree_rcu() single-argument
> > > > macro"), you have refactored the kfree_rcu macro.
> > > >
> > > > Since then, make htmldocs warns:
> > > >
> > > > ./include/linux/rcupdate.h:882: warning: Excess function parameter
> > > > 'ptr' description in 'kfree_rcu'
> > > > ./include/linux/rcupdate.h:882: warning: Excess function parameter
> > > > 'rhf' description in 'kfree_rcu'
> > > >
> > > > As you deleted the two arguments in the macro definition, kerneldoc
> > > > cannot resolve the argument names in the macro's kerneldoc
> > > > documentation anymore and warns about that.
> > > >
> > > > Probably, it is best to just turn the formal kerneldoc references to
> > > > the two arguments, which are not used in the macro definition anymore,
> > > > simply into two informal references in the documentation.
> > > >
> > > Thanks for your suggestion. I am not sure if htmldocs supports something
> > > like "__maybe_unused", but tend to say that it does not. See below the
> > > patch:
> > >
> > > <snip>
> > > >From 65ecc7c58810c963c02e0596ce2e5758c54ef55d Mon Sep 17 00:00:00 2001
> > > From: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
> > > Date: Tue, 5 Jan 2021 13:23:30 +0100
> > > Subject: [PATCH] rcu: fix kerneldoc warnings
> > >
> > > After refactoring of the kfree_rcu(), it becomes possible to use
> > > the macro with one or two arguments. From the other hand, in the
> > > description there are two arguments in the macro definition expected.
> > > That is why the "htmldocs" emits a warning about it:
> > >
> > > <snip>
> > > ./include/linux/rcupdate.h:882: warning: Excess function parameter
> > > 'ptr' description in 'kfree_rcu'
> > > ./include/linux/rcupdate.h:882: warning: Excess function parameter
> > > 'rhf' description in 'kfree_rcu'
> > > <snip>
> > >
> > > Fix it by converting two parameters into informal references in the
> > > macro description.
> > >
> > > Fixes: 3d3d9ff077a9 ("rcu: Introduce kfree_rcu() single-argument macro")
> > > Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
> > > ---
> > >  include/linux/rcupdate.h | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
> > > index ebd8dcca4997..e678ce7f5ca2 100644
> > > --- a/include/linux/rcupdate.h
> > > +++ b/include/linux/rcupdate.h
> > > @@ -854,8 +854,8 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
> > >
> > >  /**
> > >   * kfree_rcu() - kfree an object after a grace period.
> > > - * @ptr: pointer to kfree for both single- and double-argument invocations.
> > > - * @rhf: the name of the struct rcu_head within the type of @ptr,
> > > + * ptr: pointer to kfree for both single- and double-argument invocations.
> > > + * rhf: the name of the struct rcu_head within the type of ptr,
> > >   *       but only for double-argument invocations.
> > >   *
> > >   * Many rcu callbacks functions just call kfree() on the base structure.
> > > --
> > > 2.20.1
> > > <snip>
> > >
> > > Paul, does it work for you?
> >
> > If it works for the documentation generation, then it works for me.  ;-)
> >
> OK. Then we need the patch to be reviewed by the documentation generation :)
>
> Dear, linux-doc folk!
>
> Could you please review the patch that is in question?
>

I think you can shorten the feedback loop.
IMHO, the documentation is as comprehensible as before and it makes a
warning go away (getting us back to the zero-documentation-warnings
state).

Just send out your patch with linux-doc as CC and if there is no
complaint within a few days, Paul will pick it up and it is all good.

Lukas

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

* Re: kerneldoc warnings since commit 538fc2ee870a3 ("rcu: Introduce kfree_rcu() single-argument macro")
  2021-01-07  7:28       ` Lukas Bulwahn
@ 2021-01-07 13:00         ` Uladzislau Rezki
  0 siblings, 0 replies; 7+ messages in thread
From: Uladzislau Rezki @ 2021-01-07 13:00 UTC (permalink / raw)
  To: Lukas Bulwahn
  Cc: Uladzislau Rezki, linux-doc, Josh Triplett, rcu,
	Linux Kernel Mailing List, Steven Rostedt, Mathieu Desnoyers,
	Lai Jiangshan, Joel Fernandes

> On Tue, Jan 5, 2021 at 5:29 PM Uladzislau Rezki <urezki@gmail.com> wrote:
> >
> > On Tue, Jan 05, 2021 at 06:56:59AM -0800, Paul E. McKenney wrote:
> > > On Tue, Jan 05, 2021 at 02:14:41PM +0100, Uladzislau Rezki wrote:
> > > > Dear, Lukas.
> > > >
> > > > > Dear Uladzislau,
> > > > >
> > > > > in commit 538fc2ee870a3 ("rcu: Introduce kfree_rcu() single-argument
> > > > > macro"), you have refactored the kfree_rcu macro.
> > > > >
> > > > > Since then, make htmldocs warns:
> > > > >
> > > > > ./include/linux/rcupdate.h:882: warning: Excess function parameter
> > > > > 'ptr' description in 'kfree_rcu'
> > > > > ./include/linux/rcupdate.h:882: warning: Excess function parameter
> > > > > 'rhf' description in 'kfree_rcu'
> > > > >
> > > > > As you deleted the two arguments in the macro definition, kerneldoc
> > > > > cannot resolve the argument names in the macro's kerneldoc
> > > > > documentation anymore and warns about that.
> > > > >
> > > > > Probably, it is best to just turn the formal kerneldoc references to
> > > > > the two arguments, which are not used in the macro definition anymore,
> > > > > simply into two informal references in the documentation.
> > > > >
> > > > Thanks for your suggestion. I am not sure if htmldocs supports something
> > > > like "__maybe_unused", but tend to say that it does not. See below the
> > > > patch:
> > > >
> > > > <snip>
> > > > >From 65ecc7c58810c963c02e0596ce2e5758c54ef55d Mon Sep 17 00:00:00 2001
> > > > From: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
> > > > Date: Tue, 5 Jan 2021 13:23:30 +0100
> > > > Subject: [PATCH] rcu: fix kerneldoc warnings
> > > >
> > > > After refactoring of the kfree_rcu(), it becomes possible to use
> > > > the macro with one or two arguments. From the other hand, in the
> > > > description there are two arguments in the macro definition expected.
> > > > That is why the "htmldocs" emits a warning about it:
> > > >
> > > > <snip>
> > > > ./include/linux/rcupdate.h:882: warning: Excess function parameter
> > > > 'ptr' description in 'kfree_rcu'
> > > > ./include/linux/rcupdate.h:882: warning: Excess function parameter
> > > > 'rhf' description in 'kfree_rcu'
> > > > <snip>
> > > >
> > > > Fix it by converting two parameters into informal references in the
> > > > macro description.
> > > >
> > > > Fixes: 3d3d9ff077a9 ("rcu: Introduce kfree_rcu() single-argument macro")
> > > > Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
> > > > ---
> > > >  include/linux/rcupdate.h | 4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
> > > > index ebd8dcca4997..e678ce7f5ca2 100644
> > > > --- a/include/linux/rcupdate.h
> > > > +++ b/include/linux/rcupdate.h
> > > > @@ -854,8 +854,8 @@ static inline notrace void rcu_read_unlock_sched_notrace(void)
> > > >
> > > >  /**
> > > >   * kfree_rcu() - kfree an object after a grace period.
> > > > - * @ptr: pointer to kfree for both single- and double-argument invocations.
> > > > - * @rhf: the name of the struct rcu_head within the type of @ptr,
> > > > + * ptr: pointer to kfree for both single- and double-argument invocations.
> > > > + * rhf: the name of the struct rcu_head within the type of ptr,
> > > >   *       but only for double-argument invocations.
> > > >   *
> > > >   * Many rcu callbacks functions just call kfree() on the base structure.
> > > > --
> > > > 2.20.1
> > > > <snip>
> > > >
> > > > Paul, does it work for you?
> > >
> > > If it works for the documentation generation, then it works for me.  ;-)
> > >
> > OK. Then we need the patch to be reviewed by the documentation generation :)
> >
> > Dear, linux-doc folk!
> >
> > Could you please review the patch that is in question?
> >
> 
> I think you can shorten the feedback loop.
> IMHO, the documentation is as comprehensible as before and it makes a
> warning go away (getting us back to the zero-documentation-warnings
> state).
> 
> Just send out your patch with linux-doc as CC and if there is no
> complaint within a few days, Paul will pick it up and it is all good.
> 
Yep, this is what i was going to do it if no any feedback.

Thanks.

--
Vlad Rezki

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

end of thread, other threads:[~2021-01-07 13:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-05  7:32 kerneldoc warnings since commit 538fc2ee870a3 ("rcu: Introduce kfree_rcu() single-argument macro") Lukas Bulwahn
2021-01-05 13:14 ` Uladzislau Rezki
2021-01-05 14:03   ` Lukas Bulwahn
2021-01-05 14:56   ` Paul E. McKenney
2021-01-05 16:29     ` Uladzislau Rezki
2021-01-07  7:28       ` Lukas Bulwahn
2021-01-07 13:00         ` Uladzislau Rezki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).