linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: overlay: Fix kerneldoc warning in of_overlay_remove()
@ 2021-04-21 15:45 Rob Herring
  2021-04-21 19:38 ` Frank Rowand
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2021-04-21 15:45 UTC (permalink / raw)
  To: devicetree; +Cc: linux-kernel, Stephen Rothwell, Frank Rowand

'*ovcs_id' causes a warning because '*' is treated as bold markup:

Documentation/devicetree/kernel-api:56: ../drivers/of/overlay.c:1184: WARNING: Inline emphasis start-string without end-string.

Fix this to use the normal '@' markup for function parameters.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Frank Rowand <frowand.list@gmail.com>
Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/of/overlay.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index d241273170fd..67c9aa6f14da 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -1181,7 +1181,7 @@ static int overlay_removal_is_ok(struct overlay_changeset *remove_ovcs)
  * If an error is returned by an overlay changeset post-remove notifier
  * then no further overlay changeset post-remove notifier will be called.
  *
- * Return: 0 on success, or a negative error number.  *ovcs_id is set to
+ * Return: 0 on success, or a negative error number.  @ovcs_id is set to
  * zero after reverting the changeset, even if a subsequent error occurs.
  */
 int of_overlay_remove(int *ovcs_id)
-- 
2.27.0


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

* Re: [PATCH] of: overlay: Fix kerneldoc warning in of_overlay_remove()
  2021-04-21 15:45 [PATCH] of: overlay: Fix kerneldoc warning in of_overlay_remove() Rob Herring
@ 2021-04-21 19:38 ` Frank Rowand
  2021-04-21 21:03   ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Frank Rowand @ 2021-04-21 19:38 UTC (permalink / raw)
  To: Rob Herring, devicetree; +Cc: linux-kernel, Stephen Rothwell

On 4/21/21 10:45 AM, Rob Herring wrote:
> '*ovcs_id' causes a warning because '*' is treated as bold markup:
> 
> Documentation/devicetree/kernel-api:56: ../drivers/of/overlay.c:1184: WARNING: Inline emphasis start-string without end-string.
> 
> Fix this to use the normal '@' markup for function parameters.
> 
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Cc: Frank Rowand <frowand.list@gmail.com>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  drivers/of/overlay.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
> index d241273170fd..67c9aa6f14da 100644
> --- a/drivers/of/overlay.c
> +++ b/drivers/of/overlay.c
> @@ -1181,7 +1181,7 @@ static int overlay_removal_is_ok(struct overlay_changeset *remove_ovcs)
>   * If an error is returned by an overlay changeset post-remove notifier
>   * then no further overlay changeset post-remove notifier will be called.
>   *
> - * Return: 0 on success, or a negative error number.  *ovcs_id is set to
> + * Return: 0 on success, or a negative error number.  @ovcs_id is set to
>   * zero after reverting the changeset, even if a subsequent error occurs.
>   */
>  int of_overlay_remove(int *ovcs_id)
> 

The change results in incorrect information.  I am guessing that "@*ovcs_id"
would not be valid syntax (I have not tried it).  The changed version says
that the pointer ovcs_id is changed to zero, but the actual action is to
change the value pointed to by ovcs_id is changed to zero.  Is there a
valid syntax to say this?

-Frank

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

* Re: [PATCH] of: overlay: Fix kerneldoc warning in of_overlay_remove()
  2021-04-21 19:38 ` Frank Rowand
@ 2021-04-21 21:03   ` Rob Herring
  0 siblings, 0 replies; 3+ messages in thread
From: Rob Herring @ 2021-04-21 21:03 UTC (permalink / raw)
  To: Frank Rowand; +Cc: devicetree, linux-kernel, Stephen Rothwell

On Wed, Apr 21, 2021 at 2:38 PM Frank Rowand <frowand.list@gmail.com> wrote:
>
> On 4/21/21 10:45 AM, Rob Herring wrote:
> > '*ovcs_id' causes a warning because '*' is treated as bold markup:
> >
> > Documentation/devicetree/kernel-api:56: ../drivers/of/overlay.c:1184: WARNING: Inline emphasis start-string without end-string.
> >
> > Fix this to use the normal '@' markup for function parameters.
> >
> > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> > Cc: Frank Rowand <frowand.list@gmail.com>
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
> >  drivers/of/overlay.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
> > index d241273170fd..67c9aa6f14da 100644
> > --- a/drivers/of/overlay.c
> > +++ b/drivers/of/overlay.c
> > @@ -1181,7 +1181,7 @@ static int overlay_removal_is_ok(struct overlay_changeset *remove_ovcs)
> >   * If an error is returned by an overlay changeset post-remove notifier
> >   * then no further overlay changeset post-remove notifier will be called.
> >   *
> > - * Return: 0 on success, or a negative error number.  *ovcs_id is set to
> > + * Return: 0 on success, or a negative error number.  @ovcs_id is set to
> >   * zero after reverting the changeset, even if a subsequent error occurs.
> >   */
> >  int of_overlay_remove(int *ovcs_id)
> >
>
> The change results in incorrect information.  I am guessing that "@*ovcs_id"
> would not be valid syntax (I have not tried it).  The changed version says
> that the pointer ovcs_id is changed to zero, but the actual action is to
> change the value pointed to by ovcs_id is changed to zero.  Is there a
> valid syntax to say this?

I was assuming the reader should know how parameters work in C...
Having previously beat my head with the syntax here, I went with the
easy route. Normal rSt syntax would be ``*`` to escape it. But
kerneldoc isn't normal syntax. Turns out just plain "*@ovcs_id" works
without warning and highlights the parameter (which was missing
before).

I'll update the commit.

Rob

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

end of thread, other threads:[~2021-04-21 21:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21 15:45 [PATCH] of: overlay: Fix kerneldoc warning in of_overlay_remove() Rob Herring
2021-04-21 19:38 ` Frank Rowand
2021-04-21 21:03   ` Rob Herring

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).