Linux Documentation
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jonathan Corbet <corbet@lwn.net>
Cc: linux-doc@vger.kernel.org,
	Mika Westerberg <mika.westerberg@linux.intel.com>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH v1] kernel-doc: Allow anonymous enum
Date: Tue, 13 Aug 2019 15:19:12 +0300	[thread overview]
Message-ID: <20190813121912.GV30120@smile.fi.intel.com> (raw)
In-Reply-To: <20190812151317.746379b2@lwn.net>

On Mon, Aug 12, 2019 at 03:13:17PM -0600, Jonathan Corbet wrote:
> On Mon, 12 Aug 2019 19:06:31 +0300
> Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> 
> > In C is a valid construction to have an anonymous enumerator.
> > 
> > Though we have now:
> > 
> >   drivers/pinctrl/intel/pinctrl-intel.c:240: error: Cannot parse enum!
> > 
> > Support it in the kernel-doc script.
> 
> So I don't get this error; I guess the only anonymous enum of interest has
> yet to find its way into the mainline.

The other one is already in mainline (drivers/remoteproc/omap_remoteproc.h),
but suddenly it misses the second * in the header of kernel-doc comment
(perhaps to avoid above error, or for another reason).

> 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> >  scripts/kernel-doc | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/scripts/kernel-doc b/scripts/kernel-doc
> > index 6b03012750da..079502bcc5a3 100755
> > --- a/scripts/kernel-doc
> > +++ b/scripts/kernel-doc
> > @@ -1245,7 +1245,7 @@ sub dump_enum($$) {
> >      # strip #define macros inside enums
> >      $x =~ s@#\s*((define|ifdef)\s+|endif)[^;]*;@@gos;
> >  
> > -    if ($x =~ /enum\s+(\w+)\s*\{(.*)\}/) {
> > +    if ($x =~ /enum\s+(\w*)\s*\{(.*)\}/) {
> 
> Ah the joy of regexes...
> 
> Applied, thanks.

Thanks!

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2019-08-13 12:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-12 16:06 [PATCH v1] kernel-doc: Allow anonymous enum Andy Shevchenko
2019-08-12 21:13 ` Jonathan Corbet
2019-08-13 12:19   ` Andy Shevchenko [this message]
2019-08-13 12:31     ` Andy Shevchenko

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=20190813121912.GV30120@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=corbet@lwn.net \
    --cc=linus.walleij@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    /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