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=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,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 3AB8EC388F9 for ; Mon, 16 Nov 2020 23:03:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E408D2222C for ; Mon, 16 Nov 2020 23:03:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729003AbgKPXCk (ORCPT ); Mon, 16 Nov 2020 18:02:40 -0500 Received: from smtprelay0075.hostedemail.com ([216.40.44.75]:52874 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725379AbgKPXCj (ORCPT ); Mon, 16 Nov 2020 18:02:39 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id 9330A100E7B42; Mon, 16 Nov 2020 23:02:38 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-HE-Tag: pin73_56106342732c X-Filterd-Recvd-Size: 1810 Received: from XPS-9350.home (unknown [47.151.133.149]) (Authenticated sender: joe@perches.com) by omf01.hostedemail.com (Postfix) with ESMTPA; Mon, 16 Nov 2020 23:02:37 +0000 (UTC) Message-ID: <67332536788cefbc39c7f87129adca462bb42fa5.camel@perches.com> Subject: Re: [PATCH] checkpatch: Fix unescaped left brace From: Joe Perches To: Dwaipayan Ray , Andrew Morton Cc: linux-kernel-mentees@lists.linuxfoundation.org, linux-kernel@vger.kernel.org, lukas.bulwahn@gmail.com Date: Mon, 16 Nov 2020 15:02:36 -0800 In-Reply-To: References: <20201115202928.81955-1-dwaipayanray1@gmail.com> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.38.1-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2020-11-15 at 19:43 -0800, Joe Perches wrote: > On Mon, 2020-11-16 at 01:59 +0530, Dwaipayan Ray wrote: > > There is an unescaped left brace in a regex in OPEN_BRACE > > check. This throws a runtime error when checkpatch is run > > with --fix flag and the OPEN_BRACE check is executed. > > > > Fix it by escaping the left brace. > > > > Fixes: 8d1824780f2f ("checkpatch: add --fix option for a couple OPEN_BRACE misuses") > > Signed-off-by: Dwaipayan Ray > > Thanks Dwaipayan. > > Obviously that code path hasn't been tested in awhile. > > I think the notice to require an escape for a { was added back in > perl 5.16 or so. Just fyi: it seems the requirement was actually implemented in perl 5.22 and this code predates the release of perl 5.22 https://github.com/Perl/perl5/blob/blead/pod/perl5220delta.pod