From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 E040B157A46 for ; Fri, 10 Jan 2025 07:19:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736493569; cv=none; b=PmxmtRGhkZUMny1JLGd3wJ0bHx6VOr7koWZCKAfIBMFMy5S+SNxp2ydF/kRnjfte5t9WEmUjazdnkN0KnP4FD4x3+DFelrFwFqvzTzjJQQWO8GiYwTfMoPBDSShijrMgXc59kZzK/ePAOqJlTPph+sKO46L+sRIcNeXkVDs8GXk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736493569; c=relaxed/simple; bh=MBJoyxoK9XN7kqhBIK7kVx2usK29y5fVxmsGF6GO2Bc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TeCtmw7rbtvn5q0NOmAXrAWWxpvK0/6SFhG1gVNzZZGtWEjwOWwWXFGyn7S0flahghoAHq9Sj+2yJADqVg1nl21MOWwDlluP119qh3vQ+TM0g/gCbd8h4QJAd6gLwY0neZ9aFfZ7o1TX8r0lm0M/3ALSzNMa0PV3h1ghoPXHA7c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nYXx56uc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="nYXx56uc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D18DC4CED6; Fri, 10 Jan 2025 07:19:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1736493568; bh=MBJoyxoK9XN7kqhBIK7kVx2usK29y5fVxmsGF6GO2Bc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nYXx56uc3eGiMxPgcV7OcMCQAe5xlvZvf6SLALMOQshADFmZhZSewve0AtSW8s5yk yuiiRklU068P2hS/qC9l4x7UZwD6hIk3gM/Oi6dAf4iELwMo65R/oFZsrAhdokY1N3 s8nzwAr3aL0WfVKtTt82FUSqmQGFD2TUxWy8fpVQ= Date: Fri, 10 Jan 2025 08:18:37 +0100 From: Greg Kroah-Hartman To: Dan Carpenter Cc: Andy Whitcroft , Joe Perches , Dwaipayan Ray , Lukas Bulwahn , linux-kernel@vger.kernel.org Subject: Re: [PATCH] checkpatch: don't warn about extra parentheses in staging/ Message-ID: <2025011025-washcloth-track-5dc6@gregkh> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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. > > Signed-off-by: Dan Carpenter > --- > scripts/checkpatch.pl | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > 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 { > } > } > > -# 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 =~ /(^.\s*if\s*($balanced_parens))/) { > my $if_stat = $1; > -- > 2.45.2 > Yes! Thanks for this: Acked-by: Greg Kroah-Hartman