Skip to contentSkip to conversation

staging: vme_user: Added blank line after declarations

PATCH In review Rohit Chavan 3 participants 3 messages Oct 31, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: vme_user: Added blank line after declarations

Fixes below warning reported by checkpatch.
WARNING: Missing a blank line after declarations

---
 drivers/staging/vme_user/vme_fake.c | 1 +
 1 file changed, 1 insertion(+)
drivers/staging/vme_user/vme_fake.c +1 -0
index 7f84d1c86f29..c4acc010c37b 100644
@@ -67,6 +67,7 @@ struct fake_driver {
 	unsigned long long lm_base;
 	u32 lm_aspace;
 	u32 lm_cycle;
+
 	void (*lm_callback[4])(void *);
 	void *lm_data[4];
 	struct tasklet_struct int_tasklet;

--
2.34.1

#1 lore raw
Quoted 4 lines · Rohit Chavan

Fixes below warning reported by checkpatch.
WARNING: Missing a blank line after declarations

This is a checkpatch false positive. (It's not "after declarations"). Just ignore it.

regards,
dan carpenter

maintainer
#2 lore raw
Quoted 9 lines · Dan Carpenter
Quoted 4 lines · Rohit Chavan

Fixes below warning reported by checkpatch.
WARNING: Missing a blank line after declarations

This is a checkpatch false positive. (It's not "after declarations"). Just ignore it.

checkpatch could accept function pointer and function pointer arrays

---
 scripts/checkpatch.pl | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
scripts/checkpatch.pl +2 -1
index 25fdb7fda1128..de1f4962f55d6 100755
@@ -1073,6 +1073,7 @@ our $Typecast	= qr{\s*(\(\s*$NonptrType\s*\)){0,1}\s*};
 # Any use must be runtime checked with $^V
 
 our $balanced_parens = qr/(\((?:[^\(\)]++|(?-1))*\))/;
+our $balanced_brackets = qr/(\[(?:[^\[\]]++|(?-1))*\])/;
 our $LvalOrFunc	= qr{((?:[\&\*]\s*)?$Lval)\s*($balanced_parens{0,1})\s*};
 our $FuncArg = qr{$Typecast{0,1}($LvalOrFunc|$Constant|$String)};
 
@@ -4107,7 +4108,7 @@ sub process {
 			# looks like a declaration
 			    !($sl =~ /^\+\s+$Declare\s*$Ident\s*[=,;:\[]/ ||
 			# function pointer declarations
-			      $sl =~ /^\+\s+$Declare\s*\(\s*\*\s*$Ident\s*\)\s*[=,;:\[\(]/ ||
+			      $sl =~ /^\+\s+$Declare\s*\(\s*\*\s*$Ident(?:\s*$balanced_brackets)*\s*\)\s*[=,;:\[\(]/ ||
 			# foo bar; where foo is some local typedef or #define
 			      $sl =~ /^\+\s+$Ident(?:\s+|\s*\*\s*)$Ident\s*[=,;\[]/ ||
 			# known declaration macros