From nobody Tue Jun 16 11:19:19 2026 Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA6231DA23 for ; Sat, 18 Apr 2026 17:35:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=216.40.44.13 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776533713; cv=none; b=HuLLJa8EwnIf4p+v4zeKshhQXaqobLnlxC7YZOci20ivCWKbkjj2/k2WLUHDnahUyVyCdicmPYiPNY5MdrHsZBXaOOuELaLLyYvgHmu0f1952tdalOqKQFtHQixbw/GwFwIHAj9bhUkjyiVxZhWUejwgfT8jaCPgu9TMbpWSLBA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776533713; c=relaxed/simple; bh=Ci/yZo4BvbKVFg4pZ8P+Bc0iNrg2U2NJgkHsK+T/BaU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=NolozsOIEkTyn8E7TTwhr5ddiXbijP96Uk7cZDNTrWn/GLW1i8LmrupsAwNgyfCsF4hSVZHQCogPd1HdY3djh3hgYRlhqhD2PUeLaOiiZwxxg+np7Jz3f4xd/zz1TgV42Bzx2OdzJGZZqlxlwPjf4CPG0QBK1qdDS/QIOSC4k6I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com; spf=pass smtp.mailfrom=perches.com; arc=none smtp.client-ip=216.40.44.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=perches.com Received: from omf18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 960FF13B194; Sat, 18 Apr 2026 17:35:04 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf18.hostedemail.com (Postfix) with ESMTPA id 8CFDC32; Sat, 18 Apr 2026 17:35:02 +0000 (UTC) From: Joe Perches To: Andrew Morton , Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn Cc: Dan Carpenter , linux-kernel@vger.kernel.org Subject: [PATCH] checkpatch: Add check for function pointer arrays in declarations Date: Sat, 18 Apr 2026 10:34:59 -0700 Message-ID: X-Mailer: git-send-email 2.53.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Stat-Signature: fwtyg16ayijdg5h67ratbdia8djia9k9 X-Rspamd-Server: rspamout08 X-Rspamd-Queue-Id: 8CFDC32 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX19jV8YCcINtlryapLsxQ6heuec1o7ndjFM= X-HE-Tag: 1776533702-223457 X-HE-Meta: U2FsdGVkX1+/U4AyzVksQE8HQ4j6gACHBC0h7ZZrxABic8XfEbU4IxRsYMBze7a6BXDiK9TLErxefSHF68HNe4ZfafwRzvbbZGNivdlq+0hqS85TcZCf1EyR0k19/zbtQE4nDIDzn38IVsqRiTJBODs0vAHawbpkRi7YcM/uuQjKF+ioMeIskI3LXAKFeqR45hIVpdp76y2qgui3ww8jy9JJpmcwZOKhv06GYfrSm9mTtp9n1u5V/fU7uFYh3n6/LYNldvCJ7PjD9m3scS7g48MHNYKN7cJVtqNFT7D3roIGFmqETC1bITfl6UDZOugh1cR9IlQlhIY= Content-Type: text/plain; charset="utf-8" checkpatch did not allow function pointer arrays when testing declaration blocks. Add it. Signed-off-by: Joe Perches --- Too many script running folk people that don't really understand what a declaration is send patches to add unnecessary blank lines because checkpatch didn't recognize a function pointer array. scripts/checkpatch.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index e0f1d6a6bc636..76197c9fb58a5 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -4128,7 +4128,7 @@ sub process { $pl =3D~ s/\b(?:$Attribute|$Sparse)\b//g; if (($pl =3D~ /^\+\s+$Declare\s*$Ident\s*[=3D,;:\[]/ || # function pointer declarations - $pl =3D~ /^\+\s+$Declare\s*\(\s*\*\s*$Ident\s*\)\s*[=3D,;:\[\(]/ || + $pl =3D~ /^\+\s+$Declare\s*\(\s*\*\s*$Ident(?:\s*\[\s*(?:$Ident|$C= onstant)?\s*\])?\s*\)\s*[=3D,;:\[\(]/ || # foo bar; where foo is some local typedef or #define $pl =3D~ /^\+\s+$Ident(?:\s+|\s*\*\s*)$Ident\s*[=3D,;\[]/ || # known declaration macros @@ -4142,7 +4142,7 @@ sub process { # looks like a declaration !($sl =3D~ /^\+\s+$Declare\s*$Ident\s*[=3D,;:\[]/ || # function pointer declarations - $sl =3D~ /^\+\s+$Declare\s*\(\s*\*\s*$Ident\s*\)\s*[=3D,;:\[\(]/ = || + $sl =3D~ /^\+\s+$Declare\s*\(\s*\*\s*$Ident(?:\s*\[\s*(?:$Ident|$= Constant)?\s*\])?\s*\)\s*[=3D,;:\[\(]/ || # foo bar; where foo is some local typedef or #define $sl =3D~ /^\+\s+$Ident(?:\s+|\s*\*\s*)$Ident\s*[=3D,;\[]/ || # known declaration macros --=20 2.53.0