From patchwork Thu Sep 3 19:25:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 514231 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 9DA1B14032F for ; Fri, 4 Sep 2015 05:25:54 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0BE9C4B74D; Thu, 3 Sep 2015 21:25:51 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id npRGn4ZMPnSG; Thu, 3 Sep 2015 21:25:50 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AC87D4B6FC; Thu, 3 Sep 2015 21:25:50 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 938474B6FC for ; Thu, 3 Sep 2015 21:25:48 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Fgude6ZJJgRY for ; Thu, 3 Sep 2015 21:25:48 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pa0-f51.google.com (mail-pa0-f51.google.com [209.85.220.51]) by theia.denx.de (Postfix) with ESMTPS id 1BFDE4B6F8 for ; Thu, 3 Sep 2015 21:25:44 +0200 (CEST) Received: by pacwi10 with SMTP id wi10so55272945pac.3 for ; Thu, 03 Sep 2015 12:25:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=wyLpQDhyscfc0SMiNyG+PJur195Txs6+Y7BXVQkL6e4=; b=OguYCyeCp+iHT9xOnZ5cs1N3B6x45/BwAoVbE84gXBZKfXQZa2UPoXZe/jbfDuubqb H7beah23hWp1zS6W4vofpc7ixR0ri+yh39HCMFkIOKpnq6Y63sxpB3TVInkGPh5FceZ1 I+Ne/4yckcfznSmt/9fWuQDidXt7f2SfiHv5KCFj5kMhf31Wq+XW4Sjx5qwNFxqV63ZC qN5RCvPI47Ooxp1SMGo1zv1YrqA4AK2o67ERJRq5kubi3h6xvSUuJdVHHim0XQGfB433 PPMai8FB/+H5ee1DFpd7NAzyLFa+UJAzO/8Mk4xLk0CShv5Xmsit45EyqLPh3zIBdHdb jCjQ== X-Gm-Message-State: ALoCoQngXVvubWmRxc/JgYwUkccESeud7knaEhzAXXAWuLNHnVS5W5XtJ7g6uV2QnSm+g4aHez8+ X-Received: by 10.68.196.202 with SMTP id io10mr70318126pbc.141.1441308343197; Thu, 03 Sep 2015 12:25:43 -0700 (PDT) Received: from archbook.amer.corp.natinst.com (209-234-137-234.static.twtelecom.net. [209.234.137.234]) by smtp.gmail.com with ESMTPSA id i2sm615892pdk.78.2015.09.03.12.25.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Sep 2015 12:25:42 -0700 (PDT) From: Moritz Fischer To: marex@denx.de Date: Thu, 3 Sep 2015 12:25:35 -0700 Message-Id: <1441308335-13518-1-git-send-email-moritz.fischer@ettus.com> X-Mailer: git-send-email 2.5.1 Cc: joe@perches.com, u-boot@lists.denx.de Subject: [U-Boot] [PATCH] checkpatch.pl: Fix checkpatch.pl warnings with Perl 5.22 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This patch fixes a bunch of deprecation warings that show up when using checkpatch.pl with Perl 5.22. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\#\s*define.*do\s{ <-- HERE / at ./scripts/checkpatch.pl line 2829. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/\(.*\){ <-- HERE / at ./scripts/checkpatch.pl line 3262. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/do{ <-- HERE / at ./scripts/checkpatch.pl line 3263. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/^\({ <-- HERE / at ./scripts/checkpatch.pl line 3636. Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/(?^x: Signed-off-by: Moritz Fischer --- scripts/checkpatch.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 74db2e2..3a6b9fa 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -2825,8 +2825,8 @@ sub process { # function brace can't be on same line, except for #defines of do while, # or if closed on same line - if (($line=~/$Type\s*$Ident\(.*\).*\s{/) and - !($line=~/\#\s*define.*do\s{/) and !($line=~/}/)) { + if (($line=~/$Type\s*$Ident\(.*\).*\s\{/) and + !($line=~/\#\s*define.*do\s\{/) and !($line=~/\}/)) { ERROR("OPEN_BRACE", "open brace '{' following function declarations go on the next line\n" . $herecurr); } @@ -3259,12 +3259,12 @@ sub process { ## } #need space before brace following if, while, etc - if (($line =~ /\(.*\){/ && $line !~ /\($Type\){/) || - $line =~ /do{/) { + if (($line =~ /\(.*\)\{/ && $line !~ /\($Type\)\{/) || + $line =~ /do\{/) { if (ERROR("SPACING", "space required before the open brace '{'\n" . $herecurr) && $fix) { - $fixed[$linenr - 1] =~ s/^(\+.*(?:do|\))){/$1 {/; + $fixed[$linenr - 1] =~ s/^(\+.*(?:do|\)))\{/$1 {/; } } @@ -3633,7 +3633,7 @@ sub process { $dstat !~ /^for\s*$Constant$/ && # for (...) $dstat !~ /^for\s*$Constant\s+(?:$Ident|-?$Constant)$/ && # for (...) bar() $dstat !~ /^do\s*{/ && # do {... - $dstat !~ /^\({/ && # ({... + $dstat !~ /^\(\{/ && # ({... $ctx !~ /^.\s*#\s*define\s+TRACE_(?:SYSTEM|INCLUDE_FILE|INCLUDE_PATH)\b/) { $ctx =~ s/\n*$//;