Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761247Ab0FRNPi (ORCPT ); Fri, 18 Jun 2010 09:15:38 -0400 Received: from mail-gy0-f174.google.com ([209.85.160.174]:56460 "EHLO mail-gy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758698Ab0FRNPg convert rfc822-to-8bit (ORCPT ); Fri, 18 Jun 2010 09:15:36 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=U5THxHc83iw7I/ow89br8nmoucXWvWmZT7AnntLsg1t7bkNLyEhbMVBnBTCYQmRaje UFnElzhNexz75Snx3fjz79Va1pJo7g615idAECWKsJGEiyEqIzouk8IZeQBjv8tv2FDv cheVAiI1MaNf3zFuUxE+3xrw3+jNLtPBEO0EE= MIME-Version: 1.0 In-Reply-To: <1276806411-15176-1-git-send-email-scottjg@vmware.com> References: <1276806411-15176-1-git-send-email-scottjg@vmware.com> Date: Fri, 18 Jun 2010 14:15:35 +0100 X-Google-Sender-Auth: -VUVPLyM1GdGr8_gM6vV_RrpxMQ Message-ID: Subject: Re: [PATCH] checkpatch: fix false positive on casting to double pointer From: Andy Whitcroft To: "Scott J. Goldman" Cc: linux-kernel@vger.kernel.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1523 Lines: 35 On Thu, Jun 17, 2010 at 9:26 PM, Scott J. Goldman wrote: > > Signed-off-by: Scott J. Goldman > --- > ?scripts/checkpatch.pl ? ? ? ? | ? ?4 +++- > ?tests/t/t9190-double-pointers | ? ?6 ++++++ > ?2 files changed, 9 insertions(+), 1 deletions(-) > ?create mode 100644 tests/t/t9190-double-pointers > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 87bbb8b..687bd6f 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -1982,7 +1982,9 @@ sub process { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? $op eq '*' or $op eq '/' or > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? $op eq '%') > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?{ > - ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if ($ctx =~ /Wx[^WCE]|[^WCE]xW/) { > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if ($op eq '*' && $cc =~ /^\*/) { > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? # double pointer is ok > + ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? } elsif ($ctx =~ /Wx[^WCE]|[^WCE]xW/) { > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?ERROR("need consistent spacing around '$op' $at\n" . > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?$hereptr); Hrm, I would expect any number of levels of pointers to be detected already correctly. /me goes check. -apw -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/