Re: [PATCH v1] kernel-doc: Allow anonymous enum

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 12 Aug 2019 19:06:31 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx>
> ---
>  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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux