Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9172362pxu; Mon, 28 Dec 2020 08:22:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJz3D3kzxOpnSf3r0+43gz5aY4GqF9/nnj+q/Pf4u/ThTIHb6f/x0sZO66PMbCW8COsXxDQc X-Received: by 2002:a17:906:3101:: with SMTP id 1mr30026367ejx.115.1609172532428; Mon, 28 Dec 2020 08:22:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172532; cv=none; d=google.com; s=arc-20160816; b=gg7i450QnlIM+Sx3rWg/eGVgnla+f4Kxuk6f4BH200MiwOt8NGzS3vybVWNpgIXqJU hp4yMLXrl/DfMHEhkeJUSS09nKfxDLaLaf6H+XVZ6grH3puYWopD+bS+1odFWOrUrJxI umcz7luUFkTIPQHrdm4mTPQ6+4KQk0gO1uR066JpKoxWKirthy+bTVEAiVFfr2HYjcXF spBnQPpFUMN1xq6r9IzoJWGW3Y8h9BpF8R0X64blm++G9Lb5NGumPiOyKGkciwWMSZ0k h+n6W0xujGooNaBr07xsrJavrUubLOnz8Cm7i/3OYtsEKUoAGTtervpGOI8BdXQE5rtj 18lQ== 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=QuhyIs4Tc8RndQJSTO0/y0EB2eRSlbGGxlw5b56/l6M=; b=Gz2/RA7GtzbJR7yPAdS4WeklGT29HsFvZDSUCLi1vxCMqZCO64XnP0bWqdpGNmp7DS hktTn5MHdchNjGSS3H43R3BjfEQlb+m86L4oW+FrK4PazGv+okBXOkJOpxauvWNaaLnr ONfNveaVhhu0MIhIQ1tjaQakccz+vG6sbpzADAEddXVjV/pW0d3cH/Ib1/S5SF7PGTUw qd+LIBiESbXAYTujKDJRQ1N2pBOhVw/BycslpkWjSmOHXXN+MDi9uZGsfbbhNfEwNRow yQqKQv/+tMilX4Gw5xh7ts3q4nzgBMy0x2diCyCTMbSdkmO43kL51gk5sAt06pHHO4rU gCWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lt7sUTWV; 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 h9si19883975edz.579.2020.12.28.08.21.49; Mon, 28 Dec 2020 08:22:12 -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=lt7sUTWV; 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 S2633051AbgL1QSn (ORCPT + 99 others); Mon, 28 Dec 2020 11:18:43 -0500 Received: from mail.kernel.org ([198.145.29.99]:43694 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732693AbgL1NP1 (ORCPT ); Mon, 28 Dec 2020 08:15:27 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4EA02207CF; Mon, 28 Dec 2020 13:14:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161286; bh=US1AXJuyZco8jIPnYDsi6W5nDTiNHFjGMwhYwGdXBUU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lt7sUTWVBgs5hzZkydQjU2XRKy77BFrMrgKcRNT6zQfF6cRNId3XjeA9i8po4b+K7 JW7Jy33Ie7spapULFgZ9pXaju18coqdkW2fm7ZEiFGjOzsL3xFlR88CB9co7zYyjmR WK19vS4kKm+YqZdUES34TgE5RyoIPa+KgFtdfivc= 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 4.14 164/242] checkpatch: fix unescaped left brace Date: Mon, 28 Dec 2020 13:49:29 +0100 Message-Id: <20201228124912.772850863@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@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 d702bdf19eb10..0f24a6f3af995 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3898,7 +3898,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