From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) (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 9AB6CBA33 for ; Fri, 10 Jan 2025 07:41:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=216.40.44.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736494884; cv=none; b=qMpV0skmglWTe+/Epn3p/3+qItjkb+joYPVBF7MmAmxeLGNAdYmR4360d8A3OPA8HzQvXxiLUjFo+x8h3Esa6yFZE6oDLtdltENCtdrXkFPQSBIDnMO5OfqevmzeauSxHWBS9+7NX9fqWRggEyzesGK9caOaWtVn74CgNR+5pAw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736494884; c=relaxed/simple; bh=TNcixYiCrEb/AY12i7sQ7RpTI7zp3GKfxnfVxBE5lqc=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=jkMfF/bwLh/dnXUfATeRajpyeHRA0gDJ3kG4GiRimUy4Am1iO67s2diQf99zqtJzpEphHIPdcnZtzAtwGAj8X1GHJcIzV96XWeFbqKMT2+mpKHRFoV5ixUScjmCsaoNxX2SIiBjXs0IlO7BLYHhsQLeDphk7XymyGJGLeSZsmCQ= 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.16 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 omf06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id E466C12086E; Fri, 10 Jan 2025 07:32:55 +0000 (UTC) Received: from [HIDDEN] (Authenticated sender: joe@perches.com) by omf06.hostedemail.com (Postfix) with ESMTPA id 9790120010; Fri, 10 Jan 2025 07:32:53 +0000 (UTC) Message-ID: <44153a27346ff2e8dc9a2c4b04aa4bb0be09d471.camel@perches.com> Subject: Re: [PATCH] checkpatch: don't warn about extra parentheses in staging/ From: Joe Perches To: Greg Kroah-Hartman , Dan Carpenter , Andrew Morton Cc: Andy Whitcroft , Dwaipayan Ray , Lukas Bulwahn , linux-kernel@vger.kernel.org Date: Thu, 09 Jan 2025 23:32:52 -0800 In-Reply-To: <2025011025-washcloth-track-5dc6@gregkh> References: <2025011025-washcloth-track-5dc6@gregkh> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.54.2 (3.54.2-1.fc41) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 9790120010 X-Rspamd-Server: rspamout01 X-Stat-Signature: mms4qani4iumkhj8eaf9wz3hxebaojq5 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Session-ID: U2FsdGVkX192eiJ0VL3S8U+iI0/5khd13wug0ITVHgs= X-HE-Tag: 1736494373-317119 X-HE-Meta: U2FsdGVkX1+9lSSDEFB2vQdGil6Hz7tn7RzNkVH99KAd242BQdtFgJeOp9fiHBM78H3CMCTQwbN4mZMsStlgJApp5BJgEz1xHgJ8dpMF6F427ZD6nWcwBIre+3OYRy3tMR5cLlP9tJu44QQQFSmmoKXAkrmmFc/RF5umW4IUv+r/hyac93Y7xJhaebR8A+W3WCMlxyv2df8t/5gDctnV44ppQRifinfnYj8NyTmE5Llz0KhEPlZX+XiHPtswWwPRHyBXvMfQCRFWzTWiEWKSRulC17ex4rg2mzBa8mYnMdWY2zcQO4zSbbc1aD+NgNewfRI8djM9/JMeUE10JnXhmWFY/uAyfUj4Q1G149REkvicOsJbcDWoaswz/hyswJ8UwOJOq4HO/q89K9mXzSvaThiqvK4n1Ci4NTBuB2w8Jjb8lBefYhWxdPk6JwEoos9q On Fri, 2025-01-10 at 08:18 +0100, Greg Kroah-Hartman wrote: > On Fri, Jan 10, 2025 at 10:12:17AM +0300, Dan Carpenter wrote: > > This "Unnecessary parentheses" warning is disabled for drivers/staging > > unless the --strict option is used. Really, we don't want it at all > > even if the --strict option is used. > >=20 > > Signed-off-by: Dan Carpenter > > --- > > scripts/checkpatch.pl | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > >=20 > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > > index fdf07c897471..628aa9e17e91 100755 > > --- a/scripts/checkpatch.pl > > +++ b/scripts/checkpatch.pl > > @@ -5513,9 +5513,9 @@ sub process { > > } > > } > > =20 > > -# check for unnecessary parentheses around comparisons in if uses > > -# when !drivers/staging or command-line uses --strict > > - if (($realfile !~ m@^(?:drivers/staging/)@ || $check_orig) && > > +# check for unnecessary parentheses around comparisons > > +# except in drivers/staging > > + if (($realfile !~ m@^(?:drivers/staging/)@) && > > $perl_version_ok && defined($stat) && > > $stat =3D~ /(^.\s*if\s*($balanced_parens))/) { > > my $if_stat =3D $1; > > --=20 > > 2.45.2 > >=20 >=20 > Yes! Thanks for this: >=20 > Acked-by: Greg Kroah-Hartman I have no issue with this. Andrew, please apply it.