From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Mauro Carvalho Chehab <mchehab@infradead.org>,
Linux Doc Mailing List <linux-doc@vger.kernel.org>,
"chris\@chris-wilson.co.uk" <chris@chris-wilson.co.uk>
Subject: Re: [PATCH v4 16/18] scripts: kernel-doc: improve nested logic to handle multiple identifiers
Date: Fri, 16 Feb 2018 12:09:17 -0200 [thread overview]
Message-ID: <20180216120917.628d08d1@vento.lan> (raw)
In-Reply-To: <87eflnjuvu.fsf@intel.com>
Em Wed, 14 Feb 2018 20:20:21 +0200
Jani Nikula <jani.nikula@linux.intel.com> escreveu:
> On Wed, 14 Feb 2018, Mauro Carvalho Chehab <mchehab@s-opensource.com> wrote:
> > There is a simple fix, though. Make inline comments to accept a dot:
> >
> > diff --git a/scripts/kernel-doc b/scripts/kernel-doc
> > index fee8952037b1..06d7f3f2c094 100755
> > --- a/scripts/kernel-doc
> > +++ b/scripts/kernel-doc
> > @@ -363,7 +363,7 @@ my $doc_sect = $doc_com .
> > my $doc_content = $doc_com_body . '(.*)';
> > my $doc_block = $doc_com . 'DOC:\s*(.*)?';
> > my $doc_inline_start = '^\s*/\*\*\s*$';
> > -my $doc_inline_sect = '\s*\*\s*(@[\w\s]+):(.*)';
> > +my $doc_inline_sect = '\s*\*\s*(@\s*[\w][\w\.]*\s*):(.*)';
> > my $doc_inline_end = '^\s*\*/\s*$';
> > my $doc_inline_oneline = '^\s*/\*\*\s*(@[\w\s]+):\s*(.*)\s*\*/\s*$';
> > my $export_symbol = '^\s*EXPORT_SYMBOL(_GPL)?\s*\(\s*(\w+)\s*\)\s*;';
> >
> > That requires a small change at the inline parameters, though:
> >
> > diff --git a/drivers/gpu/drm/i915/intel_dpio_phy.c b/drivers/gpu/drm/i915/intel_dpio_phy.c
> > index 76473e9836c6..c8e9e44e5981 100644
> > --- a/drivers/gpu/drm/i915/intel_dpio_phy.c
> > +++ b/drivers/gpu/drm/i915/intel_dpio_phy.c
> > @@ -147,7 +147,7 @@ struct bxt_ddi_phy_info {
> > */
> > struct {
> > /**
> > - * @port: which port maps to this channel.
> > + * @channel.port: which port maps to this channel.
> > */
> > enum port port;
> > } channel[2];
>
> Perhaps it would be slightly more elegant to be able to leave out
> "channel." here and deduce that from the context... but the above
> matches what you'd write in the higher level struct comment, and
> produces the same output. It works and it's really simple. I like it.
>
> Please submit this as a proper patch, with
>
> Tested-by: Jani Nikula <jani.nikula@intel.com>
Submitted. I ended by submitting as a patch series, as, when I
did some tests with the examples, I found that kernel-doc have
issues parsing them.
Thanks,
Mauro
next prev parent reply other threads:[~2018-02-16 14:09 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-18 12:30 [PATCH v4 00/18] kernel-doc: add supported to document nested structs Mauro Carvalho Chehab
2017-12-18 12:30 ` [PATCH v4 01/18] docs: kernel-doc.rst: better describe kernel-doc arguments Mauro Carvalho Chehab
2017-12-18 12:30 ` [PATCH v4 02/18] docs: kernel-doc.rst: improve private members description Mauro Carvalho Chehab
2017-12-18 12:30 ` [PATCH v4 03/18] docs: kernel-doc.rst: improve function documentation section Mauro Carvalho Chehab
2017-12-18 12:30 ` [PATCH v4 04/18] docs: kernel-doc.rst: improve structs chapter Mauro Carvalho Chehab
2017-12-18 12:30 ` [PATCH v4 05/18] docs: kernel-doc.rst: improve typedef documentation Mauro Carvalho Chehab
2017-12-18 12:30 ` [PATCH v4 06/18] docs: kernel-doc.rst: add documentation about man pages Mauro Carvalho Chehab
2017-12-18 12:30 ` [PATCH v4 07/18] docs: get rid of kernel-doc-nano-HOWTO.txt Mauro Carvalho Chehab
2017-12-18 12:30 ` [PATCH v4 08/18] scripts: kernel-doc: get rid of unused output formats Mauro Carvalho Chehab
2017-12-18 12:30 ` [PATCH v4 09/18] scripts: kernel-doc: improve argument handling Mauro Carvalho Chehab
2017-12-18 12:30 ` [PATCH v4 10/18] scripts: kernel-doc: change default to ReST format Mauro Carvalho Chehab
2017-12-18 12:30 ` [PATCH v4 11/18] scripts: kernel-doc: replace tabs by spaces Mauro Carvalho Chehab
2017-12-18 12:30 ` [PATCH v4 12/18] scripts: kernel-doc: parse next structs/unions Mauro Carvalho Chehab
2017-12-18 12:30 ` [PATCH v4 13/18] scripts: kernel-doc: get rid of $nested parameter Mauro Carvalho Chehab
2017-12-18 12:30 ` [PATCH v4 14/18] scripts: kernel-doc: print the declaration name on warnings Mauro Carvalho Chehab
2017-12-21 3:40 ` kbuild test robot
2017-12-18 12:30 ` [PATCH v4 15/18] scripts: kernel-doc: handle nested struct function arguments Mauro Carvalho Chehab
2017-12-21 6:48 ` kbuild test robot
2017-12-18 12:30 ` [PATCH v4 16/18] scripts: kernel-doc: improve nested logic to handle multiple identifiers Mauro Carvalho Chehab
2017-12-21 9:57 ` kbuild test robot
2018-02-14 16:07 ` Jani Nikula
2018-02-14 17:53 ` Mauro Carvalho Chehab
2018-02-14 18:20 ` Jani Nikula
2018-02-16 14:09 ` Mauro Carvalho Chehab [this message]
2017-12-18 12:30 ` [PATCH v4 17/18] scripts: kernel-doc: apply filtering rules to warnings Mauro Carvalho Chehab
2017-12-18 12:30 ` [PATCH v4 18/18] w1_netlink.h: add support for nested structs Mauro Carvalho Chehab
2017-12-21 21:08 ` [PATCH v4 00/18] kernel-doc: add supported to document " Jonathan Corbet
2017-12-21 21:35 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180216120917.628d08d1@vento.lan \
--to=mchehab@s-opensource.com \
--cc=chris@chris-wilson.co.uk \
--cc=corbet@lwn.net \
--cc=jani.nikula@linux.intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).