From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C5D1AC433DB for ; Tue, 5 Jan 2021 10:08:31 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0F835224F9 for ; Tue, 5 Jan 2021 10:08:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0F835224F9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=perches.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-kernel-mentees-bounces@lists.linuxfoundation.org Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 76AC985D68; Tue, 5 Jan 2021 10:08:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id e2urKqbYj8NA; Tue, 5 Jan 2021 10:08:29 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id B5D228567A; Tue, 5 Jan 2021 10:08:29 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9B079C088B; Tue, 5 Jan 2021 10:08:29 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5038FC013A for ; Tue, 5 Jan 2021 10:08:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 4060B8708F for ; Tue, 5 Jan 2021 10:08:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vsK+S+nFpg7Y for ; Tue, 5 Jan 2021 10:08:27 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtprelay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by hemlock.osuosl.org (Postfix) with ESMTPS id 445028510C for ; Tue, 5 Jan 2021 10:08:27 +0000 (UTC) Received: from smtprelay.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by smtpgrave03.hostedemail.com (Postfix) with ESMTP id 86CC51800E367 for ; Tue, 5 Jan 2021 10:01:14 +0000 (UTC) Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay03.hostedemail.com (Postfix) with ESMTP id E7081837F24C; Tue, 5 Jan 2021 10:01:11 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: salt47_5a0046f274d8 X-Filterd-Recvd-Size: 1873 Received: from [192.168.1.159] (unknown [47.151.137.21]) (Authenticated sender: joe@perches.com) by omf09.hostedemail.com (Postfix) with ESMTPA; Tue, 5 Jan 2021 10:01:10 +0000 (UTC) Message-ID: From: Joe Perches To: Dwaipayan Ray Date: Tue, 05 Jan 2021 02:01:09 -0800 In-Reply-To: <20210105093507.29297-1-dwaipayanray1@gmail.com> References: <20210105093507.29297-1-dwaipayanray1@gmail.com> User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Cc: linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org Subject: Re: [Linux-kernel-mentees] [PATCH] checkpatch: fix unescaped left braces X-BeenThere: linux-kernel-mentees@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: linux-kernel-mentees-bounces@lists.linuxfoundation.org Sender: "Linux-kernel-mentees" On Tue, 2021-01-05 at 15:05 +0530, Dwaipayan Ray wrote: > Perl 5.22 onwards require that "A literal "{" should now be > escaped in a pattern". Not quite correct. > checkpatch contains several literal "{". Fix such instances > by preceding them with a backslash. Not all literal left braces need to be escaped. https://www.perlmonks.org/?node_id=3D1191981 > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -2036,7 +2036,7 @@ sub annotate_values { > =A0 print "ASSIGN($1)\n" if ($dbg_values > 1); > =A0 $type =3D 'N'; > =A0 > = > - } elsif ($cur =3D~/^(;|{|})/) { > + } elsif ($cur =3D~ /^(;|\{|\})/) { Like this one. And why escape the right brace too? > =A0 print "END($1)\n" if ($dbg_values > 1); > =A0 $type =3D 'E'; > =A0 $av_pend_colon =3D 'O'; > @@ -3913,7 +3913,7 @@ sub process { > =A0 # it there is no point in retrying a statement scan > =A0 # until we hit end of it. > =A0 my $frag =3D $stat; $frag =3D~ s/;+\s*$//; > - if ($frag !~ /(?:{|;)/) { > + if ($frag !~ /(?:\{|;)/) { And here. etc... _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees