Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9038439pxu; Mon, 28 Dec 2020 05:07:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJyqL0xDXdc8868BY59TF7eCAL++EnfNUHklUxkOTpqzywZKmAfTaSqoQniFv0zv25BTY39U X-Received: by 2002:aa7:dd17:: with SMTP id i23mr42000879edv.14.1609160859492; Mon, 28 Dec 2020 05:07:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609160859; cv=none; d=google.com; s=arc-20160816; b=LWVMMbFdN2iIWyvkDoqVJN8uA1VNiU77Ec4oalEiQq0cXdi9h0lZ1fxRtZi+vw5wG4 EV8Fyj2yCMmQvusmA6Y9Bo9F3vvOh+Ln94Gpb9qtNMPbjSPvRmrmHq2rltpeFyIiYNpY uqbYSuwnUzPgDf3+BS51ECQjzHS/cIbtJU0NooJhWDi7P589rJlBKjKmfx1UnIz7yzYO C6G2jqqY+7N6X2mK5+tyjK6pAWEXG3biRQjHBnegl9Ug/fHI1EfkWwlG410N++cnf9PR UYltO3OuRx/FxO48rKOCMHMNJcW1tRZI8RafBQa11b26PlNOhV2JSzKIOX7DhR2nzp3D n/DQ== 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=toDw3AszIlJMDg9f04+7zZcmH35NDZtyIHMUIEKKDXc=; b=UHrysIEVDO8Y5guHl8HGNF4/9nce6UApF72DQHG94PwTlX/Mk42NdjXNm64UlwJiwu BjsWyU7r4xz5QLEDkvpSwCiBKTXmLV1O5jvDqkgUJnQVFEdQwwcWxNPYucmSDE3owvxF iX5A0O+ITBpIetAj2fvrc1YzrBzrILGWdgQaVEJpUKFIBImrXNeUtajDaYud4ae3lEXR SbDHSPU0NDBOhIeNCtWaHa9y7CEITX54WqLS9Iy1yF90NrNGXaF8usv89FKpXjS0pwgT C7uFjp7NQhFDFP/pzST9UOyBb4B6SwjteeBykN8WzNmVquO4Vd67HcponT7/mDctY2FI JIHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=SzTUKQsB; 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 qn10si18827190ejb.591.2020.12.28.05.07.16; Mon, 28 Dec 2020 05:07:39 -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=SzTUKQsB; 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 S1730578AbgL1NFT (ORCPT + 99 others); Mon, 28 Dec 2020 08:05:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:32904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730540AbgL1NE7 (ORCPT ); Mon, 28 Dec 2020 08:04:59 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5275622583; Mon, 28 Dec 2020 13:04:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160659; bh=RrbJ4+7p2iNFjjHMmfG4uXIo4O5twLFiZCJZBbcwzwE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SzTUKQsB7Ow8L0ABmZldPH5r98Guas8EFa1xQ2QgKhbDRh/lhluxoLYVX6z4eAR+g ZUVuxOEzw2SpYUKbFz+LVzzRSjH/L+NYQ+jbOUUy1OxMbrfJluibMCY/nEYC0gLxKx 27XcNMstqGwkpdb9WquvvCe/0/BQvdWDb9F0p7Tw= 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.9 119/175] checkpatch: fix unescaped left brace Date: Mon, 28 Dec 2020 13:49:32 +0100 Message-Id: <20201228124859.024146357@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@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 9432387dc1789..c3b23244e64ff 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3818,7 +3818,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