public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts: kernel_doc: fixup reporting of function identifiers
@ 2018-02-13 11:31 Mike Rapoport
  2018-02-16 14:56 ` Jonathan Corbet
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Rapoport @ 2018-02-13 11:31 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: linux-doc, linux-kernel, Mike Rapoport

When function description includes brackets after the function name as
suggested by Documentation/doc-guide/kernel-doc, the kernel-doc script
omits the function name from "Scanning doc for" report.
Extending match for identifier name with optional brackets fixes this
issue.

Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
---
 scripts/kernel-doc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index fee8952037b1..a6a9a8ef116c 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -1873,7 +1873,7 @@ sub process_file($) {
 	    }
 	    elsif (/$doc_decl/o) {
 		$identifier = $1;
-		if (/\s*([\w\s]+?)\s*-/) {
+		if (/\s*([\w\s]+?)(\(\))?\s*-/) {
 		    $identifier = $1;
 		}
 
-- 
2.7.4

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

* Re: [PATCH] scripts: kernel_doc: fixup reporting of function identifiers
  2018-02-13 11:31 [PATCH] scripts: kernel_doc: fixup reporting of function identifiers Mike Rapoport
@ 2018-02-16 14:56 ` Jonathan Corbet
  2018-02-16 16:36   ` Markus Heiser
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Corbet @ 2018-02-16 14:56 UTC (permalink / raw)
  To: Mike Rapoport; +Cc: linux-doc, linux-kernel

On Tue, 13 Feb 2018 13:31:46 +0200
Mike Rapoport <rppt@linux.vnet.ibm.com> wrote:

> When function description includes brackets after the function name as
> suggested by Documentation/doc-guide/kernel-doc, the kernel-doc script
> omits the function name from "Scanning doc for" report.
> Extending match for identifier name with optional brackets fixes this
> issue.

So let me channel akpm here and ask: what are the user-visible effects of
this problem?  I ask because applying it doesn't make any difference in
the "make htmldocs" output here.  So I don't understand why you're
wanting to make this change.

Thanks,

jon

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

* Re: [PATCH] scripts: kernel_doc: fixup reporting of function identifiers
  2018-02-16 14:56 ` Jonathan Corbet
@ 2018-02-16 16:36   ` Markus Heiser
  2018-02-18 23:48     ` Jonathan Corbet
  0 siblings, 1 reply; 4+ messages in thread
From: Markus Heiser @ 2018-02-16 16:36 UTC (permalink / raw)
  To: Jonathan Corbet; +Cc: Mike Rapoport, Linux Doc Mailing List, linux-kernel


> Am 16.02.2018 um 15:56 schrieb Jonathan Corbet <corbet@lwn.net>:
> 
> On Tue, 13 Feb 2018 13:31:46 +0200
> Mike Rapoport <rppt@linux.vnet.ibm.com> wrote:
> 
>> When function description includes brackets after the function name as
>> suggested by Documentation/doc-guide/kernel-doc, the kernel-doc script
>> omits the function name from "Scanning doc for" report.
>> Extending match for identifier name with optional brackets fixes this
>> issue.
> 
> So let me channel akpm here and ask: what are the user-visible effects of
> this problem?  I ask because applying it doesn't make any difference in
> the "make htmldocs" output here.  So I don't understand why you're
> wanting to make this change.

Use kernel-doc -v and take a look on the info-messages.

In Documentation/doc-guide/kernel-doc we recommend to use

/**
 * foo() - lorem ipsum

to tag functions, but if you do so, the info message is broken,
the function name is missed at the end of the message:

 ../test123.c:2: info: Scanning doc for  

Here is the similar patch to kernel-doc python version:

 https://github.com/return42/linuxdoc/commit/84d665df34cc3c9908a4b8ce0fdf193165a1ffa4

@Mike: thanks!

--Markus--

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

* Re: [PATCH] scripts: kernel_doc: fixup reporting of function identifiers
  2018-02-16 16:36   ` Markus Heiser
@ 2018-02-18 23:48     ` Jonathan Corbet
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Corbet @ 2018-02-18 23:48 UTC (permalink / raw)
  To: Markus Heiser; +Cc: Mike Rapoport, Linux Doc Mailing List, linux-kernel

On Fri, 16 Feb 2018 17:36:07 +0100
Markus Heiser <markus.heiser@darmarit.de> wrote:

> > So let me channel akpm here and ask: what are the user-visible effects of
> > this problem?  I ask because applying it doesn't make any difference in
> > the "make htmldocs" output here.  So I don't understand why you're
> > wanting to make this change.  
> 
> Use kernel-doc -v and take a look on the info-messages.
> 
> In Documentation/doc-guide/kernel-doc we recommend to use
> 
> /**
>  * foo() - lorem ipsum
> 
> to tag functions, but if you do so, the info message is broken,
> the function name is missed at the end of the message:
> 
>  ../test123.c:2: info: Scanning doc for  

OK, so I guess that message is the only effect of this bug.  Oh well,
I'll go ahead and apply the patch, thanks.

jon

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

end of thread, other threads:[~2018-02-18 23:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-13 11:31 [PATCH] scripts: kernel_doc: fixup reporting of function identifiers Mike Rapoport
2018-02-16 14:56 ` Jonathan Corbet
2018-02-16 16:36   ` Markus Heiser
2018-02-18 23:48     ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox