From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUEwF-0005Bv-6k for qemu-devel@nongnu.org; Sat, 26 Nov 2011 04:52:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RUEwD-0003Ol-Vz for qemu-devel@nongnu.org; Sat, 26 Nov 2011 04:52:51 -0500 Received: from mail-iy0-f173.google.com ([209.85.210.173]:48730) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RUEwD-0003Mx-Sx for qemu-devel@nongnu.org; Sat, 26 Nov 2011 04:52:49 -0500 Received: by mail-iy0-f173.google.com with SMTP id k32so6531337iak.4 for ; Sat, 26 Nov 2011 01:52:49 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1322213056-16612-1-git-send-email-pbonzini@redhat.com> References: <1322213056-16612-1-git-send-email-pbonzini@redhat.com> From: Blue Swirl Date: Sat, 26 Nov 2011 09:52:28 +0000 Message-ID: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 1.0] checkpatch.pl: fix CAST detection List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: peter.chubb@nicta.com.au, qemu-devel@nongnu.org Thanks, applied. On Fri, Nov 25, 2011 at 09:24, Paolo Bonzini wrote: > From: Florian Mickler > > We should only claim that something is a cast if we did not encouter a > token before, that did set av_pending. > > This fixes the operator * in the line below to be detected as binary (vs > unary). > > kmalloc(sizeof(struct alphatrack_ocmd) * true_size, GFP_KERNEL); > > Reported-by: Peter Chubb > Signed-off-by: Florian Mickler > (cherry-picked from Linux kernel commit c023e4734c3e8801e0ecb5e81b831d42a= 374d861) > Signed-off-by: Paolo Bonzini > Cc: Blue Swirl > --- > =C2=A0scripts/checkpatch.pl | =C2=A0 =C2=A02 +- > =C2=A01 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 36d6851..ddd27d8 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -859,7 +859,7 @@ sub annotate_values { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0$av_preprocessor =3D 0; > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0} > > - =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 } elsif ($cur =3D~ /^(= \(\s*$Type\s*)\)/) { > + =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 } elsif ($cur =3D~ /^(= \(\s*$Type\s*)\)/ && $av_pending eq '_') { > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0print "CAST($1)\n" if ($dbg_values > 1); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0push(@av_paren_type, $type); > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0$type =3D 'C'; > -- > 1.7.7.1 > >