From: Jonathan Corbet <corbet@lwn.net>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
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: Mon, 12 Aug 2019 15:13:17 -0600 [thread overview]
Message-ID: <20190812151317.746379b2@lwn.net> (raw)
In-Reply-To: <20190812160631.32844-1-andriy.shevchenko@linux.intel.com>
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.
> 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.
jon
next prev parent reply other threads:[~2019-08-12 21:13 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 [this message]
2019-08-13 12:19 ` Andy Shevchenko
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=20190812151317.746379b2@lwn.net \
--to=corbet@lwn.net \
--cc=andriy.shevchenko@linux.intel.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.