* [PATCH v2 0/2] kernel-doc: extend $type_param to match members referenced by pointer
@ 2018-11-07 16:47 Mike Rapoport
2018-11-07 16:47 ` [PATCH v2 1/2] kernel-doc: kill trailing whitespace Mike Rapoport
2018-11-07 16:47 ` [PATCH v2 2/2] kernel-doc: extend $type_param to match members referenced by pointer Mike Rapoport
0 siblings, 2 replies; 5+ messages in thread
From: Mike Rapoport @ 2018-11-07 16:47 UTC (permalink / raw)
To: Jonathan Corbet; +Cc: linux-doc, linux-kernel, Mike Rapoport
Hi,
v2: separate whitespace and functional changes
Mike Rapoport (2):
kernel-doc: kill trailing whitespace
kernel-doc: extend $type_param to match members referenced by pointer
scripts/kernel-doc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/2] kernel-doc: kill trailing whitespace
2018-11-07 16:47 [PATCH v2 0/2] kernel-doc: extend $type_param to match members referenced by pointer Mike Rapoport
@ 2018-11-07 16:47 ` Mike Rapoport
2018-11-07 16:47 ` [PATCH v2 2/2] kernel-doc: extend $type_param to match members referenced by pointer Mike Rapoport
1 sibling, 0 replies; 5+ messages in thread
From: Mike Rapoport @ 2018-11-07 16:47 UTC (permalink / raw)
To: Jonathan Corbet; +Cc: linux-doc, linux-kernel, Mike Rapoport
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
---
scripts/kernel-doc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index ffbe901..24d3550 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -361,7 +361,7 @@ my $doc_com = '\s*\*\s*';
my $doc_com_body = '\s*\* ?';
my $doc_decl = $doc_com . '(\w+)';
# @params and a strictly limited set of supported section names
-my $doc_sect = $doc_com .
+my $doc_sect = $doc_com .
'\s*(\@[.\w]+|\@\.\.\.|description|context|returns?|notes?|examples?)\s*:(.*)';
my $doc_content = $doc_com_body . '(.*)';
my $doc_block = $doc_com . 'DOC:\s*(.*)?';
@@ -751,7 +751,7 @@ sub output_blockhead_rst(%) {
#
# Apply the RST highlights to a sub-block of text.
-#
+#
sub highlight_block($) {
# The dohighlight kludge requires the text be called $contents
my $contents = shift;
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] kernel-doc: extend $type_param to match members referenced by pointer
2018-11-07 16:47 [PATCH v2 0/2] kernel-doc: extend $type_param to match members referenced by pointer Mike Rapoport
2018-11-07 16:47 ` [PATCH v2 1/2] kernel-doc: kill trailing whitespace Mike Rapoport
@ 2018-11-07 16:47 ` Mike Rapoport
2018-11-07 19:37 ` Markus Heiser
2018-11-07 22:48 ` Jonathan Corbet
1 sibling, 2 replies; 5+ messages in thread
From: Mike Rapoport @ 2018-11-07 16:47 UTC (permalink / raw)
To: Jonathan Corbet; +Cc: linux-doc, linux-kernel, Mike Rapoport
Currently, function parameter description can match '@type.member'
expressions but fails to match '@type->member'.
Extend the $type_param regex to allow matching both
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
---
scripts/kernel-doc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 24d3550..f9f1431 100755
--- a/scripts/kernel-doc
+++ b/scripts/kernel-doc
@@ -212,7 +212,7 @@ my $anon_struct_union = 0;
my $type_constant = '\b``([^\`]+)``\b';
my $type_constant2 = '\%([-_\w]+)';
my $type_func = '(\w+)\(\)';
-my $type_param = '\@(\w*(\.\w+)*(\.\.\.)?)';
+my $type_param = '\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)';
my $type_fp_param = '\@(\w+)\(\)'; # Special RST handling for func ptr params
my $type_env = '(\$\w+)';
my $type_enum = '\&(enum\s*([_\w]+))';
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 2/2] kernel-doc: extend $type_param to match members referenced by pointer
2018-11-07 16:47 ` [PATCH v2 2/2] kernel-doc: extend $type_param to match members referenced by pointer Mike Rapoport
@ 2018-11-07 19:37 ` Markus Heiser
2018-11-07 22:48 ` Jonathan Corbet
1 sibling, 0 replies; 5+ messages in thread
From: Markus Heiser @ 2018-11-07 19:37 UTC (permalink / raw)
To: Mike Rapoport, Jonathan Corbet; +Cc: linux-doc, linux-kernel
Am 07.11.18 um 17:47 schrieb Mike Rapoport:
> Currently, function parameter description can match '@type.member'
> expressions but fails to match '@type->member'.
> Extend the $type_param regex to allow matching both
>
> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
> ---
> scripts/kernel-doc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/kernel-doc b/scripts/kernel-doc
> index 24d3550..f9f1431 100755
> --- a/scripts/kernel-doc
> +++ b/scripts/kernel-doc
> @@ -212,7 +212,7 @@ my $anon_struct_union = 0;
> my $type_constant = '\b``([^\`]+)``\b';
> my $type_constant2 = '\%([-_\w]+)';
> my $type_func = '(\w+)\(\)';
> -my $type_param = '\@(\w*(\.\w+)*(\.\.\.)?)';
> +my $type_param = '\@(\w*((\.\w+)|(->\w+))*(\.\.\.)?)';
Thanks, works! FWIW: added [1] this to the linuxdoc project (a kernel-doc
spinoff). There we have a small frmaework for testing kernel-doc patches [2].
Which found a few hundert usages of '->' pointers in the whole kernel sources.
[1] https://github.com/return42/linuxdoc/commit/cce336ce0
[2] https://github.com/return42/linuxdoc/blob/master/Makefile#L95
-- Markus --
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 2/2] kernel-doc: extend $type_param to match members referenced by pointer
2018-11-07 16:47 ` [PATCH v2 2/2] kernel-doc: extend $type_param to match members referenced by pointer Mike Rapoport
2018-11-07 19:37 ` Markus Heiser
@ 2018-11-07 22:48 ` Jonathan Corbet
1 sibling, 0 replies; 5+ messages in thread
From: Jonathan Corbet @ 2018-11-07 22:48 UTC (permalink / raw)
To: Mike Rapoport; +Cc: linux-doc, linux-kernel
On Wed, 7 Nov 2018 18:47:13 +0200
Mike Rapoport <rppt@linux.ibm.com> wrote:
> Currently, function parameter description can match '@type.member'
> expressions but fails to match '@type->member'.
> Extend the $type_param regex to allow matching both
>
> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
That makes a lot of changes to the generated output but, as far as I can
tell, they're all correct. A definite improvement. Applied, thanks.
jon
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-11-07 22:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-07 16:47 [PATCH v2 0/2] kernel-doc: extend $type_param to match members referenced by pointer Mike Rapoport
2018-11-07 16:47 ` [PATCH v2 1/2] kernel-doc: kill trailing whitespace Mike Rapoport
2018-11-07 16:47 ` [PATCH v2 2/2] kernel-doc: extend $type_param to match members referenced by pointer Mike Rapoport
2018-11-07 19:37 ` Markus Heiser
2018-11-07 22: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;
as well as URLs for NNTP newsgroup(s).