From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756196AbbJ2NHQ (ORCPT ); Thu, 29 Oct 2015 09:07:16 -0400 Received: from exsmtp03.microchip.com ([198.175.253.49]:31530 "EHLO email.microchip.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751204AbbJ2NHP (ORCPT ); Thu, 29 Oct 2015 09:07:15 -0400 From: Christian Gromm To: CC: Christian Gromm , Andy Whitcroft , Andrew Morton , Subject: [PATCH] scripts: checkpatch: remove preceding dot-slash from path name Date: Thu, 29 Oct 2015 14:06:49 +0100 Message-ID: <1446124009-26947-1-git-send-email-christian.gromm@microchip.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In case checkpatch is called with a path name that starts with ./ for the current directory not all issues are being reported since internal path checks don't succeed. This patch removes the leading './' from $filename. This is needed to have checkpatch report all issues found during execution. Signed-off-by: Christian Gromm --- scripts/checkpatch.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index f2a1131..44435fd 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -730,6 +730,9 @@ my $fixlinenr = -1; my $vname; for my $filename (@ARGV) { my $FILE; + if ($filename =~ /^(\.\/)/) { + substr($filename, 0, 2) = ""; + } if ($file) { open($FILE, '-|', "diff -u /dev/null $filename") || die "$P: $filename: diff failed - $!\n"; -- 1.7.9.5