[ovs-dev] [PATCH v4 7/7] checkpatch: fix pointer declaration

Aaron Conole aconole at redhat.com
Mon May 1 20:14:09 UTC 2017


A common way of expressing 'raise to the power of' when authoring
comments uses **.  This is currently getting caught by the pointer
spacing warning.  So, catch it here.

Reported-by: Lance Richardson <lrichard at redhat.com>
Signed-off-by: Aaron Conole <aconole at redhat.com>
---
 utilities/checkpatch.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
index acf6f15..f22ceac 100755
--- a/utilities/checkpatch.py
+++ b/utilities/checkpatch.py
@@ -76,7 +76,7 @@ __regex_is_for_if_single_line_bracket = \
     re.compile(r'^ +(if|for|while) \(.*\)')
 __regex_ends_with_bracket = \
     re.compile(r'[^\s]\) {(\s+/\*[\s\Sa-zA-Z0-9\.,\?\*/+-]*)?$')
-__regex_ptr_declaration_missing_whitespace = re.compile(r'[a-zA-Z0-9]\*')
+__regex_ptr_declaration_missing_whitespace = re.compile(r'[a-zA-Z0-9]\*[^*]')
 
 skip_leading_whitespace_check = False
 skip_trailing_whitespace_check = False
-- 
2.9.3



More information about the dev mailing list