Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754406AbbL3PuV (ORCPT ); Wed, 30 Dec 2015 10:50:21 -0500 Received: from mail-qk0-f178.google.com ([209.85.220.178]:34926 "EHLO mail-qk0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751184AbbL3PuR (ORCPT ); Wed, 30 Dec 2015 10:50:17 -0500 From: "Geyslan G. Bem" To: peter.senna@gmail.com Cc: "Geyslan G. Bem" , Andy Whitcroft , Joe Perches , linux-kernel@vger.kernel.org Subject: [PATCH] checkpatch: fix left brace warning Date: Wed, 30 Dec 2015 12:49:31 -0300 Message-Id: <1451490572-10096-1-git-send-email-geyslan@gmail.com> X-Mailer: git-send-email 2.6.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1368 Lines: 39 This patch escapes a regex that uses left brace. Using checkpatch.pl with Perl 5.22.0 generates the warning: "Unescaped left brace in regex is deprecated, passed through in regex;" Comment from regcomp.c in Perl source: "Currently we don't warn when the lbrace is at the start of a construct. This catches it in the middle of a literal string, or when it's the first thing after something like "\b"." This works as a complement to 4e5d56bd. Signed-off-by: Geyslan G. Bem Suggested-by: Peter Senna Tschudin --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index d4960f7..3e11a30 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -4108,7 +4108,7 @@ sub process { ## } #need space before brace following if, while, etc - if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\){/) || + if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) || $line =~ /do\{/) { if (ERROR("SPACING", "space required before the open brace '{'\n" . $herecurr) && -- 2.6.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/