Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: kdoc: properly handle empty enum arguments

Depending on how the enum proto is written, a comma at the end
may incorrectly make kernel-doc parse an arg like " ".

Strip spaces before checking if arg is empty.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Message-ID: <4182bfb7e5f5b4bbaf05cee1bede691e56247eaf.1773074166.git.mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <640784283d52c5fc52ea597344ecd567e2fb6e22.1773770483.git.mchehab+huawei@kernel.org>

authored by

Mauro Carvalho Chehab and committed by
Jonathan Corbet
d5265f7a b1e64e30

+3 -2
+3 -2
tools/lib/python/kdoc/kdoc_parser.py
··· 810 810 member_set = set() 811 811 members = KernRe(r'\([^;)]*\)').sub('', members) 812 812 for arg in members.split(','): 813 - if not arg: 814 - continue 815 813 arg = KernRe(r'^\s*(\w+).*').sub(r'\1', arg) 814 + if not arg.strip(): 815 + continue 816 + 816 817 self.entry.parameterlist.append(arg) 817 818 if arg not in self.entry.parameterdescs: 818 819 self.entry.parameterdescs[arg] = self.undescribed