Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9403830pxu; Mon, 28 Dec 2020 15:21:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJwICTssCMZrCuzWWM9F2HrUYPoHp3eSsn/IqcmDCIv+Mnr8gtdx+m504Spu80mFdNIPQ8tL X-Received: by 2002:a05:6402:a45:: with SMTP id bt5mr44151630edb.130.1609197704840; Mon, 28 Dec 2020 15:21:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609197704; cv=none; d=google.com; s=arc-20160816; b=mwquXeERebXgwr3eKx8NbxDiOaH0xMrcwx5H1f6ZCFetIP1Fl+F5LFPWOEyjQM1Wa3 CAQh45asJjRE0/TilaF0nUBgDrRxvKoODqKOI6DSIejBNYkes8NMwEfJ/rZkpnJOJssg PtyMwEtJWxmHIRyuX+ESt444R5i1KcYhFd3J6uiC7MORB9wQFOlRc7Y51xa23RHo+HoA kqbYyVU3ziWC7JT6Yl+hcYndERU5IRlNxYZLyEVVW408467W9ZMQLVPhvt57f63ecIwX Ovm0pZZ/kNzmIxOJnWOcZxDLxKRX/+k2gCxz7Po7C6taBZsrirzAm/g541Wvr2bU6L7j cEuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=h0SRaVi9Ssu9RFcke8hSTR9hoP2J28UQquU8E9x9a/I=; b=N6SmDdjewf8PMhlmFowl1FX3q6p9vBMJZakBWAzZBturj3O3i+iBtsHTQ+Ga42YjX8 xo3buYxVvtUn9x+a3vrbJFGsazBrGE4tItCHBy6ne4A2VB4CXHifuq5Pjpr2I3/kPj1D 4EDOYwn/UMNNYvGUIlRV/Xfjnuf3rq+XQ9MIffXqTO9b3tdelLJuW1Dx92DUOJhZ7YNm sNYiwcXUJ67EN2HpNrjGUKI/G9c/1CbaoiPa3wOkCwv6/zmha9fQ0lzWJxV6FFgYybAz NQtfujeFxMig3E14WjkJOt1cjkDlgQzKQTCRb0qb/WZheyXJERai7bvU2bEWobzeZwyS vfwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EV5vz0Un; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n22si16629985edv.49.2020.12.28.15.21.23; Mon, 28 Dec 2020 15:21:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=EV5vz0Un; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502226AbgL1OVk (ORCPT + 99 others); Mon, 28 Dec 2020 09:21:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:56634 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2502324AbgL1OVL (ORCPT ); Mon, 28 Dec 2020 09:21:11 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2F5F1221F0; Mon, 28 Dec 2020 14:20:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165230; bh=fv281GONAecwfU735Iudm85vXf0DXrWC57GJ8ZIqFEI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EV5vz0UnRrD5WtGHlkk0u41TlfqG9GnySvYY3MvPf0zkcq0T4wcTQcbK/afsYk8LB RC6ofN5CWR90MfnXz6l3lLw9C15hY6stXwbrY9Hptlao5LYfnK1R5GtEGwasAStHa0 bttz5VFQWfmfftt/s1rFEcQ1ajcQfSNl5/C6PBNI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dwaipayan Ray , Joe Perches , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 5.10 459/717] checkpatch: fix unescaped left brace Date: Mon, 28 Dec 2020 13:47:37 +0100 Message-Id: <20201228125042.959231952@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dwaipayan Ray [ Upstream commit 03f4935135b9efeb780b970ba023c201f81cf4e6 ] 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. Link: https://lkml.kernel.org/r/20201115202928.81955-1-dwaipayanray1@gmail.com Fixes: 8d1824780f2f ("checkpatch: add --fix option for a couple OPEN_BRACE misuses") Signed-off-by: Dwaipayan Ray Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index fab38b493cef7..0ad235ee96f91 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -4384,7 +4384,7 @@ sub process { $fix) { fix_delete_line($fixlinenr, $rawline); my $fixed_line = $rawline; - $fixed_line =~ /(^..*$Type\s*$Ident\(.*\)\s*){(.*)$/; + $fixed_line =~ /(^..*$Type\s*$Ident\(.*\)\s*)\{(.*)$/; my $line1 = $1; my $line2 = $2; fix_insert_line($fixlinenr, ltrim($line1)); -- 2.27.0