linux-kernel-mentees.lists.linuxfoundation.org archive mirror
 help / color / mirror / Atom feed
* [Linux-kernel-mentees] [PATCH] Security: Documentation: fix: `make htmldocs` warnings
@ 2020-07-06 18:00 Puranjay Mohan
  2020-07-06 18:14 ` Jonathan Corbet
  0 siblings, 1 reply; 3+ messages in thread
From: Puranjay Mohan @ 2020-07-06 18:00 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: linux-doc, linux-kernel-mentees, linux-kernel, Puranjay Mohan

Remove extra ')' after function name to fix warnings.
It solves following warning :
WARNING: Unparseable C cross-reference: 'groups_sort)'
Invalid C declaration: Expected end of definition. [error at 11]

Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
---
 Documentation/security/credentials.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/security/credentials.rst b/Documentation/security/credentials.rst
index 282e79feee6a..d51e42b92395 100644
--- a/Documentation/security/credentials.rst
+++ b/Documentation/security/credentials.rst
@@ -455,7 +455,7 @@ When replacing the group list, the new list must be sorted before it
 is added to the credential, as a binary search is used to test for
 membership.  In practice, this means :c:func:`groups_sort` should be
 called before :c:func:`set_groups` or :c:func:`set_current_groups`.
-:c:func:`groups_sort)` must not be called on a ``struct group_list`` which
+:c:func:`groups_sort` must not be called on a ``struct group_list`` which
 is shared as it may permute elements as part of the sorting process
 even if the array is already sorted.
 
-- 
2.27.0

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

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

* Re: [Linux-kernel-mentees] [PATCH] Security: Documentation: fix: `make htmldocs` warnings
  2020-07-06 18:00 [Linux-kernel-mentees] [PATCH] Security: Documentation: fix: `make htmldocs` warnings Puranjay Mohan
@ 2020-07-06 18:14 ` Jonathan Corbet
  2020-07-06 18:21   ` Puranjay Mohan
  0 siblings, 1 reply; 3+ messages in thread
From: Jonathan Corbet @ 2020-07-06 18:14 UTC (permalink / raw)
  To: Puranjay Mohan; +Cc: linux-doc, linux-kernel-mentees, linux-kernel

On Mon,  6 Jul 2020 23:30:10 +0530
Puranjay Mohan <puranjay12@gmail.com> wrote:

> Remove extra ')' after function name to fix warnings.
> It solves following warning :
> WARNING: Unparseable C cross-reference: 'groups_sort)'
> Invalid C declaration: Expected end of definition. [error at 11]
> 
> Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
> ---
>  Documentation/security/credentials.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Documentation/security/credentials.rst b/Documentation/security/credentials.rst
> index 282e79feee6a..d51e42b92395 100644
> --- a/Documentation/security/credentials.rst
> +++ b/Documentation/security/credentials.rst
> @@ -455,7 +455,7 @@ When replacing the group list, the new list must be sorted before it
>  is added to the credential, as a binary search is used to test for
>  membership.  In practice, this means :c:func:`groups_sort` should be
>  called before :c:func:`set_groups` or :c:func:`set_current_groups`.
> -:c:func:`groups_sort)` must not be called on a ``struct group_list`` which
> +:c:func:`groups_sort` must not be called on a ``struct group_list`` which
>  is shared as it may permute elements as part of the sorting process
>  even if the array is already sorted.

So this is a great fix, thanks for sending it.  That said, there are a
couple of ways in which this fix can be made even better:

 - The simpler of the two is to change the subject line of the patch.
   "Fix a warning" is almost never a good description of what you're
   doing; what you are actually doing is fixing a broken cross reference.
   So the subject line should say that.

 - In this case, though, there is a much better thing to do.  We
   deprecated the use of :c:func: around a year ago; the docs build system
   can now do the right thing automatically.  So a fix that would both
   eliminate the warning and improve the document as a whole would be to
   replace every instance of:

	:c:func:`function_name`

   with:

	function_name()

Is there any chance I could get you to send a patch that does that?

Thanks,

jon
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

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

* Re: [Linux-kernel-mentees] [PATCH] Security: Documentation: fix: `make htmldocs` warnings
  2020-07-06 18:14 ` Jonathan Corbet
@ 2020-07-06 18:21   ` Puranjay Mohan
  0 siblings, 0 replies; 3+ messages in thread
From: Puranjay Mohan @ 2020-07-06 18:21 UTC (permalink / raw)
  To: Jonathan Corbet
  Cc: Linux Documentation List, linux-kernel-mentees,
	Linux Kernel Mailing List

On Mon, Jul 6, 2020 at 11:44 PM Jonathan Corbet <corbet@lwn.net> wrote:
>
> On Mon,  6 Jul 2020 23:30:10 +0530
> Puranjay Mohan <puranjay12@gmail.com> wrote:
>
> > Remove extra ')' after function name to fix warnings.
> > It solves following warning :
> > WARNING: Unparseable C cross-reference: 'groups_sort)'
> > Invalid C declaration: Expected end of definition. [error at 11]
> >
> > Signed-off-by: Puranjay Mohan <puranjay12@gmail.com>
> > ---
> >  Documentation/security/credentials.rst | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Documentation/security/credentials.rst b/Documentation/security/credentials.rst
> > index 282e79feee6a..d51e42b92395 100644
> > --- a/Documentation/security/credentials.rst
> > +++ b/Documentation/security/credentials.rst
> > @@ -455,7 +455,7 @@ When replacing the group list, the new list must be sorted before it
> >  is added to the credential, as a binary search is used to test for
> >  membership.  In practice, this means :c:func:`groups_sort` should be
> >  called before :c:func:`set_groups` or :c:func:`set_current_groups`.
> > -:c:func:`groups_sort)` must not be called on a ``struct group_list`` which
> > +:c:func:`groups_sort` must not be called on a ``struct group_list`` which
> >  is shared as it may permute elements as part of the sorting process
> >  even if the array is already sorted.
>
> So this is a great fix, thanks for sending it.  That said, there are a
> couple of ways in which this fix can be made even better:
>
>  - The simpler of the two is to change the subject line of the patch.
>    "Fix a warning" is almost never a good description of what you're
>    doing; what you are actually doing is fixing a broken cross reference.
>    So the subject line should say that.
>
>  - In this case, though, there is a much better thing to do.  We
>    deprecated the use of :c:func: around a year ago; the docs build system
>    can now do the right thing automatically.  So a fix that would both
>    eliminate the warning and improve the document as a whole would be to
>    replace every instance of:
>
>         :c:func:`function_name`
>
>    with:
>
>         function_name()
>
> Is there any chance I could get you to send a patch that does that?
Yes! I have started working on it.
>
> Thanks,
>
> jon
Thanks,
Puranjay
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

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

end of thread, other threads:[~2020-07-06 18:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-06 18:00 [Linux-kernel-mentees] [PATCH] Security: Documentation: fix: `make htmldocs` warnings Puranjay Mohan
2020-07-06 18:14 ` Jonathan Corbet
2020-07-06 18:21   ` Puranjay Mohan

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