From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756087AbZA3PFj (ORCPT ); Fri, 30 Jan 2009 10:05:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752024AbZA3PF3 (ORCPT ); Fri, 30 Jan 2009 10:05:29 -0500 Received: from adelie.canonical.com ([91.189.90.139]:60132 "EHLO adelie.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751729AbZA3PF3 (ORCPT ); Fri, 30 Jan 2009 10:05:29 -0500 From: Andy Whitcroft To: Andrew Morton Cc: Ingo Molnar , linux-kernel@vger.kernel.org, Andy Whitcroft Subject: [PATCH 4/8] checkpatch: pointer type star may have modifiers following Date: Fri, 30 Jan 2009 15:05:16 +0000 Message-Id: <1233327920-16691-5-git-send-email-apw@canonical.com> X-Mailer: git-send-email 1.6.1.2.419.g0d87e In-Reply-To: <1233327920-16691-1-git-send-email-apw@canonical.com> References: <1233327920-16691-1-git-send-email-apw@canonical.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We may have any modifier following a pointer type star. Handle this: void * __user * __user foo; Signed-off-by: Andy Whitcroft --- scripts/checkpatch.pl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 92d1371..15a5904 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1886,11 +1886,11 @@ sub process { if ($ctx !~ /[WEBC]x./ && $ca !~ /(?:\)|!|~|\*|-|\&|\||\+\+|\-\-|\{)$/) { ERROR("space required before that '$op' $at\n" . $hereptr); } - if ($op eq '*' && $cc =~/\s*const\b/) { + if ($op eq '*' && $cc =~/\s*$Modifier\b/) { # A unary '*' may be const } elsif ($ctx =~ /.xW/) { - ERROR("space prohibited after that '$op' $at\n" . $hereptr); + ERROR("Aspace prohibited after that '$op' $at\n" . $hereptr); } # unary ++ and unary -- are allowed no space on one side. -- 1.6.1.2.419.g0d87e