Skip to contentSkip to conversation

checkpatch-handle-file-pointer-type.patch removed from -mm tree

merged mm-nonmm-stable Andrew Morton 1 participant 1 message Sep 12, 2022

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: checkpatch: handle FILE pointer type
has been removed from the -mm tree. Its filename was
checkpatch-handle-file-pointer-type.patch

This patch was dropped because it was merged into the mm-nonmm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Mickaël Salaün <[email protected]>
Subject: checkpatch: handle FILE pointer type
Date: Fri, 2 Sep 2022 13:19:23 +0200

When using a "FILE *" type, checkpatch considers this an error:
ERROR: need consistent spacing around '*' (ctx:WxV) #32: FILE: f.c:8:
+static void a(FILE *const b)

                      ^

Fix this by explicitly defining "FILE" as a common type. This is useful for user space patches.

With this patch, we now get:
<E> <E> <_>WS( )
<E> <E> <_>IDENT(static)
<E> <V> <_>WS( )
<E> <V> <_>DECLARE(void )
<E> <T> <_>FUNC(a)
<E> <V> <V>PAREN('(')
<EV> <N> <_>DECLARE(FILE *const ) <EV> <T> <_>IDENT(b)
<EV> <V> <_>PAREN(')') -> V
<E> <V> <_>WS(
)
32 > . static void a(FILE *const b)
32 > EEVVVVVVVTTTTTVNTTTTTTTTTTTTVVV 32 > ______________________________

---

 scripts/checkpatch.pl |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
scripts/checkpatch.pl renamed from scripts/checkpatch.pl~checkpatch-handle-file-pointer-type +5 -1
@@ -576,10 +576,14 @@ our $typeKernelTypedefs = qr{(?x:
 	(?:__)?(?:u|s|be|le)(?:8|16|32|64)|
 	atomic_t
 )};
+our $typeStdioTypedefs = qr{(?x:
+	FILE
+)};
 our $typeTypedefs = qr{(?x:
 	$typeC99Typedefs\b|
 	$typeOtherOSTypedefs\b|
-	$typeKernelTypedefs\b
+	$typeKernelTypedefs\b|
+	$typeStdioTypedefs\b
 )};
 
 our $zero_initializer = qr{(?:(?:0[xX])?0+$Int_type?|NULL|false)\b};

_

Patches currently in -mm which might be from [email protected] are