summaryrefslogtreecommitdiff
path: root/scripts/kernel-doc
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-08-12 19:06:31 +0300
committerJonathan Corbet <corbet@lwn.net>2019-08-12 15:00:37 -0600
commit15e2544ed38a1e39b702277bdcd2bb1275e78925 (patch)
treef5ed50d2515b81422cd23e15fc68018bdb828468 /scripts/kernel-doc
parent82bf829b692d6bc9c44cd43ddd75a9b04f1bfa8d (diff)
kernel-doc: Allow anonymous enum
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. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'scripts/kernel-doc')
-rwxr-xr-xscripts/kernel-doc2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/kernel-doc b/scripts/kernel-doc
index 32e793ca5e95..81dc91760b23 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*\{(.*)\}/) {
$declaration_name = $1;
my $members = $2;
my %_members;