[PATCH 07/13] docs: kdoc: remove a useless empty capture group

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

 



The is_define_proto case in dump_function() uses a regex with an empty
capture group - () - that has no use; just take it out.

Signed-off-by: Jonathan Corbet <corbet@xxxxxxx>
---
 scripts/lib/kdoc/kdoc_parser.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/lib/kdoc/kdoc_parser.py b/scripts/lib/kdoc/kdoc_parser.py
index decd127df82e..f9be5414244d 100644
--- a/scripts/lib/kdoc/kdoc_parser.py
+++ b/scripts/lib/kdoc/kdoc_parser.py
@@ -972,11 +972,11 @@ class KernelDoc:
         found = False
 
         if is_define_proto:
-            r = KernRe(r'^()(' + name + r')\s+')
+            r = KernRe(r'^(' + name + r')\s+')
 
             if r.search(prototype):
                 return_type = ''
-                declaration_name = r.group(2)
+                declaration_name = r.group(1)
                 func_macro = True
 
                 found = True
-- 
2.51.0





[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