Skip to contentSkip to conversation

checkpatch: port fix from kernel "## is not a valid modifier"

Qemu-devel Applied Christian Borntraeger 2 participants 2 messages Oct 8, 2015 – Oct 9, 2015 Checkpatch

lore
Share & tools
lore
#0 lore raw

From: Andy Whitcroft <[email protected]>

checkpatch currently loops on fpu/softfloat.c Turns out this is fixed in the Linux version of checkpatch.

So this is a port of Andy Whitcrofts fix from Linux, Original commit was commit 89a883530fe7 ("checkpatch: ## is not a valid modifier")

As suggested by Peter Maydell for the QEMU version we drop the last "|" as there seems to be no need for that. (FWIW, the kernel discusion about that dried out:
http://www.spinics.net/lists/kernel/msg1944421.html
)

---
 scripts/checkpatch.pl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
scripts/checkpatch.pl +3 -1
index b6d71ea..9755e82 100755
@@ -1010,7 +1010,9 @@ sub possible {
 			case|
 			else|
 			asm|__asm__|
-			do
+			do|
+			\#|
+			\#\#
 		)(?:\s|$)|
 		^(?:typedef|struct|enum)\b
 	    )}x;
Signature · 1 line
2.4.3
#1 lore raw
Quoted 9 lines · Christian Borntraeger

From: Andy Whitcroft <[email protected]>

checkpatch currently loops on fpu/softfloat.c Turns out this is fixed in the Linux version of checkpatch.

So this is a port of Andy Whitcrofts fix from Linux, Original commit was commit 89a883530fe7 ("checkpatch: ## is not a valid modifier")

Quoted 8 lines

As suggested by Peter Maydell for the QEMU version we drop the last "|" as there seems to be no need for that. (FWIW, the kernel discusion about that dried out:
http://www.spinics.net/lists/kernel/msg1944421.html
)

Queued, thanks.

Paolo

Quoted 20 lines
---
 scripts/checkpatch.pl | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
scripts/checkpatch.pl +3 -1
index b6d71ea..9755e82 100755
@@ -1010,7 +1010,9 @@ sub possible {
 			case|
 			else|
 			asm|__asm__|
-			do
+			do|
+			\#|
+			\#\#
 		)(?:\s|$)|
 		^(?:typedef|struct|enum)\b
 	    )}x;