From patchwork Wed May 6 22:29:04 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1284844 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=frc0c+BI; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49HWZD5jY0z9sP7 for ; Thu, 7 May 2020 08:32:52 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 60EDC80E91; Thu, 7 May 2020 00:32:47 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="frc0c+BI"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 09E0281D7B; Thu, 7 May 2020 00:32:37 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd41.google.com (mail-io1-xd41.google.com [IPv6:2607:f8b0:4864:20::d41]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 8F87B81E4C for ; Thu, 7 May 2020 00:29:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd41.google.com with SMTP id i19so1632351ioh.12 for ; Wed, 06 May 2020 15:29:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UviKRsJdnMemuxPmxQUYrIbuqy4EtN3rpBpINLLXyUc=; b=frc0c+BIGhEDFk9+rssbguMHYXbPXLbuPKGHcdZpoXiRWkM33fTHzN3NO3HBOSnyW9 CVIawSwdJqKkYuKJCUIqYmYDDwSCy2x9KphcUk9xvdzHFaLp4YLsfnI5NE0loRvk0EdL bYqXIdhhfXWMwaoGwE2E8kKE1iDpbeK6LSBoE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UviKRsJdnMemuxPmxQUYrIbuqy4EtN3rpBpINLLXyUc=; b=Q2/6cWKRgWVS3rBDBESkWecivZeX1oIdH56iadiSymWjg+x7kDlv3k3j8uQOlu960r 7MR3fvflDKDADTpLQLq8nSE9vUjDeXFQsfwtQfj9f89ClNDm80WTiJx3tCXUbhE7gL2u zzpZpIIHRZLULPsyGQwc6FDVqWx6y202t+m7FGAtsBm3Rh7ZnEth7UHBLziVs8wuThej HXULGRomE50PVSV6oYR46/HDdlwtWtnCmF5/1kVlunyPZdWRC8uhtEg56b5/gPgxJCyM 01R3QZF/qd4cFY7Oi45HsRi83qsaxMVOWl/xJ9a/hWA2enLz9Ukl5lYsnXOyvDskNSKy E3Qg== X-Gm-Message-State: AGi0PubsmdyKHVNzrb89gLCvY0FCpVcBiJHFQForzs4vIImYnr4SyOQ4 JKAjoSfaXPNfJ+tl8YAGMTsHPjq9qSA= X-Google-Smtp-Source: APiQypIk9PyAWcxUQG/JzJ8BXEVMYzbMN3JPAJQUhaxrksXIddx6O4AKe46PX+woDSy+NozeJNjz9Q== X-Received: by 2002:a02:b19a:: with SMTP id t26mr10829212jah.111.1588804163925; Wed, 06 May 2020 15:29:23 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id r3sm1756628iot.0.2020.05.06.15.29.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 15:29:23 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Sean Anderson , Simon Glass Subject: [PATCH 1/6] patman: Fix 'warning' typo Date: Wed, 6 May 2020 16:29:04 -0600 Message-Id: <20200506222910.152322-2-sjg@chromium.org> X-Mailer: git-send-email 2.26.2.645.ge9eca65c58-goog In-Reply-To: <20200506222910.152322-1-sjg@chromium.org> References: <20200506222910.152322-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean If no warnings are detected due to checkpatch having unexpected options, patman currently shows an error: TypeError: unsupported operand type(s) for +=: 'int' and 'property' Fix this by initing the variable correctly. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- tools/patman/checkpatch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py index 795b519314..a2611a8a82 100644 --- a/tools/patman/checkpatch.py +++ b/tools/patman/checkpatch.py @@ -59,7 +59,7 @@ def CheckPatch(fname, verbose=False): 'stdout'] result = collections.namedtuple('CheckPatchResult', fields) result.ok = False - result.errors, result.warning, result.checks = 0, 0, 0 + result.errors, result.warnings, result.checks = 0, 0, 0 result.lines = 0 result.problems = [] chk = FindCheckPatch() From patchwork Wed May 6 22:29:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1284845 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=Kd0Hxkik; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49HWZZ0hJxz9sP7 for ; Thu, 7 May 2020 08:33:10 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B7C6E80E91; Thu, 7 May 2020 00:32:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Kd0Hxkik"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F2B578226A; Thu, 7 May 2020 00:32:35 +0200 (CEST) Received: from mail-io1-xd42.google.com (mail-io1-xd42.google.com [IPv6:2607:f8b0:4864:20::d42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id EF50A8226A for ; Thu, 7 May 2020 00:29:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd42.google.com with SMTP id d7so2103244ioq.5 for ; Wed, 06 May 2020 15:29:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jAZkL1V9XWbCCjdXIeRB4oORNEk9/YFrkAI3RWH+/Tk=; b=Kd0Hxkik1MHGSZwp6ASLXdVv9vozaG/tvxmRF4VF7aUBM6yudk24QN3iVPd1LUEfx0 4R9HN8eg9Fg1pWSqVyvWfk8OCzy5qgLi6tpH3qACkIRpa3FwYPjxmpIvbwZIyJx7CNMG AvXgs3GVmvJ+coddk+O13IWolerGh+8Y/mcYw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jAZkL1V9XWbCCjdXIeRB4oORNEk9/YFrkAI3RWH+/Tk=; b=BBmBPxiOIskJDbqv8FDPVpdyPS8/3y3ZTzguBv+E4hUsxZJnrrVhSSJ7yhht+yaDlQ QbSN0ooscDKkxIGsRQ44dulWeBXUKaaf6fAnj5XMHC576sBLF6VKiug+BGkokJz21Zzr 3GFdcxY8iIf7eBeXuDZtdmV9lIKh4XXus8FBO65pjzU4b/lYUrtQffPBQwH5LS8pGct/ zc7adFy4AXyqeIjcD2zxvnQfSrV25AoU/9EXuNHJYA2ijkAzdJenVmEv0nICjeyKhIQn Y/jx5uIa2K6QvYXkT1L1r+HDRetPCWaCsbF83tnxnN3eJi3OySbpakvWhM8qhyvrdxNW 69Hw== X-Gm-Message-State: AGi0PuY2UksiHlLr/kmbKYadqkHK2667UakJTxzPgzMWyH4LY8fHb74h Q0d/E2lKQ1D5enVh2R1T5MDJHqdLDI8= X-Google-Smtp-Source: APiQypKgTDhb3whD9OQotd5q/MyCWejmxp/fmawirwbkl+Yo57o2DurWj1dqmlNngLRhP4vbYFphOQ== X-Received: by 2002:a6b:9346:: with SMTP id v67mr10753644iod.154.1588804165382; Wed, 06 May 2020 15:29:25 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id r3sm1756628iot.0.2020.05.06.15.29.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 15:29:24 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Sean Anderson , Simon Glass Subject: [PATCH 2/6] patman: Support emacs mode with checkpatch Date: Wed, 6 May 2020 16:29:05 -0600 Message-Id: <20200506222910.152322-3-sjg@chromium.org> X-Mailer: git-send-email 2.26.2.645.ge9eca65c58-goog In-Reply-To: <20200506222910.152322-1-sjg@chromium.org> References: <20200506222910.152322-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean If checkpatch is run in 'emacs' mode it shows the filename at the start of each line. Add support for this so that the warnings and errors are correctly detected. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- tools/patman/checkpatch.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py index a2611a8a82..16d534b6ae 100644 --- a/tools/patman/checkpatch.py +++ b/tools/patman/checkpatch.py @@ -72,13 +72,17 @@ def CheckPatch(fname, verbose=False): # total: 0 errors, 0 warnings, 159 lines checked # or: # total: 0 errors, 2 warnings, 7 checks, 473 lines checked - re_stats = re.compile('total: (\\d+) errors, (\d+) warnings, (\d+)') - re_stats_full = re.compile('total: (\\d+) errors, (\d+) warnings, (\d+)' + emacs_prefix = '(?:[0-9]{4}.*\.patch:[0-9]+: )?' + emacs_stats = '(?:[0-9]{4}.*\.patch )?' + re_stats = re.compile(emacs_stats + + 'total: (\\d+) errors, (\d+) warnings, (\d+)') + re_stats_full = re.compile(emacs_stats + + 'total: (\\d+) errors, (\d+) warnings, (\d+)' ' checks, (\d+)') re_ok = re.compile('.*has no obvious style problems') re_bad = re.compile('.*has style problems, please review') re_error = re.compile('ERROR: (.*)') - re_warning = re.compile('WARNING: (.*)') + re_warning = re.compile(emacs_prefix + 'WARNING:(?:[A-Z_]+:)? (.*)') re_check = re.compile('CHECK: (.*)') re_file = re.compile('#\d+: FILE: ([^:]*):(\d+):') From patchwork Wed May 6 22:29:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1284846 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=BHZnUqH9; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49HWZl5zSMz9sP7 for ; Thu, 7 May 2020 08:33:19 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 006D5822A4; Thu, 7 May 2020 00:33:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="BHZnUqH9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 3141081002; Thu, 7 May 2020 00:32:51 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x141.google.com (mail-il1-x141.google.com [IPv6:2607:f8b0:4864:20::141]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 777C0822A1 for ; Thu, 7 May 2020 00:29:28 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x141.google.com with SMTP id t12so1763645ile.9 for ; Wed, 06 May 2020 15:29:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8pQOmzI/Az3+t2ReTS1IUZdYBa+xcnFdTlngF0NWO3s=; b=BHZnUqH977MwDx7tDbjhdrmaw5o+9HxrNMjD1kIAhTc4PfCJKOjzHBSFsihMu6RGDd oD8SktWv6uuohvCk75DpOwmro2XNfl7APFNRm9nLWvogcC/ow5/DGmeeCqXBd1ObBbbO 0Gv0A933WAEvD7/PTUQqmKs5/VugrMhRWgUgo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8pQOmzI/Az3+t2ReTS1IUZdYBa+xcnFdTlngF0NWO3s=; b=RkXGoICxPayCQM96KlB51G7G6QjLOS4XW3bJ3uFeZHyoBAiIUaDtz96D5ZJqZgxiGS MQTIZDMgEWhmTzahE8EvvoBomo6Y0ULVC4Fs0dfnd+2vT40SHiPORSP2+rH1hYaUPZqQ O14bQzU7TDheDlsOUfWFyJbUz0/+dazwbxWX8U5M3pLaVXUeKYwUeakKoiijC6GC0MhR hVz4sv+ifkQ8dfdGr8YGilCAdDk40w1tVXPKvOINoCKS+tEx0qfaRCN8pATvROwB8Hbb YPwd8fXLqshBjBas5O+XXy/QVaj5rEvpujXoVOtH1QJUaG7lBZNjER1KFOan/AEe0+C2 XHEw== X-Gm-Message-State: AGi0PuZol3RRrujiXyxVFJan7LjwaA2Voyu9Ue4ZJp/jzEuyYsAW4Niq DLnjnIlQb1RCv4sxXkGyb7CLC18YXhU= X-Google-Smtp-Source: APiQypLO/mdswKc8EJXSoh8fRpNMRF+lO5/s4jhCAASsrRnkVjo2Q1garx6u1ocIKuMNeCyfYut/Bg== X-Received: by 2002:a92:49c7:: with SMTP id k68mr10877540ilg.252.1588804166761; Wed, 06 May 2020 15:29:26 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id r3sm1756628iot.0.2020.05.06.15.29.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 15:29:26 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Sean Anderson , Simon Glass Subject: [PATCH 3/6] patman: Don't try to process checkpatch lines twice Date: Wed, 6 May 2020 16:29:06 -0600 Message-Id: <20200506222910.152322-4-sjg@chromium.org> X-Mailer: git-send-email 2.26.2.645.ge9eca65c58-goog In-Reply-To: <20200506222910.152322-1-sjg@chromium.org> References: <20200506222910.152322-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Once we have determined what the line refers to there is no point in processing it further. Update the logic to continue to the next line in these cases. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- tools/patman/checkpatch.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py index 16d534b6ae..2cfa9778c6 100644 --- a/tools/patman/checkpatch.py +++ b/tools/patman/checkpatch.py @@ -91,9 +91,11 @@ def CheckPatch(fname, verbose=False): print(line) # A blank line indicates the end of a message - if not line and item: - result.problems.append(item) - item = {} + if not line: + if item: + result.problems.append(item) + item = {} + continue match = re_stats_full.match(line) if not match: match = re_stats.match(line) @@ -105,10 +107,13 @@ def CheckPatch(fname, verbose=False): result.lines = int(match.group(4)) else: result.lines = int(match.group(3)) + continue elif re_ok.match(line): result.ok = True + continue elif re_bad.match(line): result.ok = False + continue err_match = re_error.match(line) warn_match = re_warning.match(line) file_match = re_file.match(line) From patchwork Wed May 6 22:29:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1284848 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=G3HdxQul; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49HWb81lWGz9sP7 for ; Thu, 7 May 2020 08:33:40 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 19733822D2; Thu, 7 May 2020 00:33:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="G3HdxQul"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 1BBC2802DB; Thu, 7 May 2020 00:32:52 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x135.google.com (mail-il1-x135.google.com [IPv6:2607:f8b0:4864:20::135]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id E12A7822AF for ; Thu, 7 May 2020 00:29:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x135.google.com with SMTP id c16so1052286ilr.3 for ; Wed, 06 May 2020 15:29:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pdbAPjjFARAlRLZSHNaOo2MYFN60cfsBQVa+0omHwiA=; b=G3HdxQultqTtB3jSn3ZFURP2RcgzR4XmB1KxKIAWguoIeC1Dj+Y1Z0AIG3AL7JbD4v LbgTkLrtcpONChg6CRFafzqutsYhUI7W/kOBm9c/xbCZvHMDV9jnPom8K/9hWowQHkSa pIAjK6IWKAc3ReAgYzkdfrMIhpJrvB1ZkIkno= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pdbAPjjFARAlRLZSHNaOo2MYFN60cfsBQVa+0omHwiA=; b=UXfrC5C0sK4oIh41kSxm8QQoXSqeYTtsy39m//oqJRvRVhuwWhTHv9CGw7ZZEDlpXO KYvgaOHyl0sJaQqGo31ytX9lGVlhieefEHpdyY02ytHLQPFBmSb93XNOYcMQPS45U75C 0fxu8Z9V1w5yG0S2kLvzx/J0VLuVT9tw5yo78Ubz+gmRgNDpotJfFtX8pTUK+IjavKil CszcfFvghou1xL/hvd12YHfGgL/r2jPnhx3AjkQoC1s3sEyXtqXOhT2ezCUlnW4h+ZmJ 0sCXNUtXK67bBeuLkRgthQBy8PjMMljRFu7jpUdEIHKCVrWCf2cuTyWCIOTbH2rUAEPB eWDA== X-Gm-Message-State: AGi0Puaso3K/V+3jGcfi4ShSYEwzpJVvnulMpfjgUbN0Rh87/Ko+7l4b oH2+p3hPJunPAAl2xaWpVlzqCl2WvdA= X-Google-Smtp-Source: APiQypLnl9Kn5k4mb3IhibWcObaKjwoXOSkT8tOgp9FvZQ8b2DEMOsquqdQVS/SACzXEXaCEzhHqXw== X-Received: by 2002:a92:c004:: with SMTP id q4mr10898095ild.93.1588804168139; Wed, 06 May 2020 15:29:28 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id r3sm1756628iot.0.2020.05.06.15.29.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 15:29:27 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Sean Anderson , Simon Glass Subject: [PATCH 4/6] patman: Handle checkpatch output with notes and code Date: Wed, 6 May 2020 16:29:07 -0600 Message-Id: <20200506222910.152322-5-sjg@chromium.org> X-Mailer: git-send-email 2.26.2.645.ge9eca65c58-goog In-Reply-To: <20200506222910.152322-1-sjg@chromium.org> References: <20200506222910.152322-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean If checkpatch is configured to output code we should ignore it. Similarly, notes should be ignored. Update the logic to handle these situations. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- tools/patman/checkpatch.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py index 2cfa9778c6..5426bb9e9e 100644 --- a/tools/patman/checkpatch.py +++ b/tools/patman/checkpatch.py @@ -85,7 +85,8 @@ def CheckPatch(fname, verbose=False): re_warning = re.compile(emacs_prefix + 'WARNING:(?:[A-Z_]+:)? (.*)') re_check = re.compile('CHECK: (.*)') re_file = re.compile('#\d+: FILE: ([^:]*):(\d+):') - + re_note = re.compile('NOTE: (.*)') + indent = ' ' * 6 for line in result.stdout.splitlines(): if verbose: print(line) @@ -96,6 +97,14 @@ def CheckPatch(fname, verbose=False): result.problems.append(item) item = {} continue + if re_note.match(line): + continue + # Skip lines which quote code + if line.startswith(indent): + continue + # Skip code quotes and # + if line.startswith('+') or line.startswith('#'): + continue match = re_stats_full.match(line) if not match: match = re_stats.match(line) From patchwork Wed May 6 22:29:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1284847 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=hV4Zjl4w; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49HWZx2rT1z9sP7 for ; Thu, 7 May 2020 08:33:29 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BB48A822CB; Thu, 7 May 2020 00:33:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="hV4Zjl4w"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id AAFFA81CF9; Thu, 7 May 2020 00:32:47 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x133.google.com (mail-il1-x133.google.com [IPv6:2607:f8b0:4864:20::133]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 53669822B2 for ; Thu, 7 May 2020 00:29:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-il1-x133.google.com with SMTP id e8so147706ilm.7 for ; Wed, 06 May 2020 15:29:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=R/5QqMN9l8T5by+MqszzCNziCadtIfAXHdDqwTlBXKQ=; b=hV4Zjl4w0lXauMk1Kh+8BFUxDcocrLk1KU+AjHH2F8Pxaytb4FRAzcbowpunVBTRV7 c6to3bIn/nD53LeLLV7lkOhvaRA7vr6f1CJMWRkBi++gPT9MFwqFNNhi7ikrvxc7iRkm HkQKxNZ/Q3SP8UZ82QLFJZ9ruwnk9L9xdcjlM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=R/5QqMN9l8T5by+MqszzCNziCadtIfAXHdDqwTlBXKQ=; b=dvGcLNmQAed6jkln1KyU0Dk0DvP+W4+eBYDiN/VAO0vF82grkNXrw5eVHxUOvqN5xN SJBb37LZz22HUfw4vg/cNNO/JCxsQvGxgU93oMQ76m6uFIAc4/4VMIO5rygHHp70tYfA qqdg1ncmQ899ro7/dxjR1i9CEmsHCh4eFwXBmw9ZM85s2sZu8NzQOQqFs7FsSMO3Huj+ TQ3D0YG2+DE/3mNIJl5Cy8mBIO39FQfvwwEQFbZbI/jqnNb51azcszVT43RbzxhDYYfq ZEQ5UxcmyY2mzu8uMLhUtQ3+vJVtkzux6kw+3WXPobqdLie919NEl5GphomO0xlYDp/h +7xg== X-Gm-Message-State: AGi0PuZCFbFERn7CsWsNJy67LbXza/QTTZVr+LKWFMeT6vVgYsMQcSOe O+IbtgXwLzHuRgAId0E6GPtKD+9LkOQ= X-Google-Smtp-Source: APiQypJz3A5I1YluCpLGzuuew40z//K02bNSIVqNWQXvmIgDZaBIm+XOnfIRZ+XgtoED9kEczx8I/A== X-Received: by 2002:a92:3a48:: with SMTP id h69mr10894470ila.150.1588804169462; Wed, 06 May 2020 15:29:29 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id r3sm1756628iot.0.2020.05.06.15.29.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 15:29:28 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Sean Anderson , Simon Glass Subject: [PATCH 5/6] patman: Support warnings in the patch subject Date: Wed, 6 May 2020 16:29:08 -0600 Message-Id: <20200506222910.152322-6-sjg@chromium.org> X-Mailer: git-send-email 2.26.2.645.ge9eca65c58-goog In-Reply-To: <20200506222910.152322-1-sjg@chromium.org> References: <20200506222910.152322-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Sometimes checkpatch outputs problems in the patch subject. Add support for parsing this output and reporting it correctly. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- tools/patman/checkpatch.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py index 5426bb9e9e..5ae450d771 100644 --- a/tools/patman/checkpatch.py +++ b/tools/patman/checkpatch.py @@ -127,6 +127,7 @@ def CheckPatch(fname, verbose=False): warn_match = re_warning.match(line) file_match = re_file.match(line) check_match = re_check.match(line) + subject_match = line.startswith('Subject:') if err_match: item['msg'] = err_match.group(1) item['type'] = 'error' @@ -139,6 +140,9 @@ def CheckPatch(fname, verbose=False): elif file_match: item['file'] = file_match.group(1) item['line'] = int(file_match.group(2)) + elif subject_match: + item['file'] = '' + item['line'] = None return result @@ -157,7 +161,8 @@ def GetWarningMsg(col, msg_type, fname, line, msg): msg_type = col.Color(col.RED, msg_type) elif msg_type == 'check': msg_type = col.Color(col.MAGENTA, msg_type) - return '%s:%d: %s: %s\n' % (fname, line, msg_type, msg) + line_str = '' if line is None else '%d' % line + return '%s:%s: %s: %s\n' % (fname, line_str, msg_type, msg) def CheckPatches(verbose, args): '''Run the checkpatch.pl script on each patch''' From patchwork Wed May 6 22:29:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1284849 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=LkeHe4FD; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49HWbb0bW6z9sP7 for ; Thu, 7 May 2020 08:34:03 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 33379822D3; Thu, 7 May 2020 00:33:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="LkeHe4FD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C896881CD9; Thu, 7 May 2020 00:32:59 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-io1-xd44.google.com (mail-io1-xd44.google.com [IPv6:2607:f8b0:4864:20::d44]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id C3282822C4 for ; Thu, 7 May 2020 00:29:33 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-io1-xd44.google.com with SMTP id z2so2168568iol.11 for ; Wed, 06 May 2020 15:29:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IQ30XWRYNB99kqhsceMKZgm4AmTXb9azt+O72GvxoTE=; b=LkeHe4FDzMFp0xzWD+Yj3hZqwZSklHChX2JOr8Fp8cAdJyWtVvlsSKVAKnBYk46X4T ccyumg79x+BCHZ7rjtUzR7BmwwcVxo9FetEu6BorGWM/ex/GQ6YV6dMyvS8PFDXY7hO1 UUZQTReNjXoZu/CeIIzF1uN+QN/9Mz8fkR+nk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IQ30XWRYNB99kqhsceMKZgm4AmTXb9azt+O72GvxoTE=; b=t0GFoJYUMgycRtWeWrE/GtHCEhti4EMP75YEg0kdfLkDMKrjG+oHggyiRuvhMW3JC5 O+1VF9nH1hNMUjEhSQvMVf240J/9F+yAkSFB2fj+8KHgiWP+uR/c2bwDbv7PsNFoE9hs yeMxg8G5eBWSr5cusK/iVaPIqCRKFL+LKXZJRDuncxhsfMi+CBzKod9nMZFzAN4qGH3M Y//PTFT3IZUNnFZoxsHl9mrwpqHk6rBu6l/rUa2qGZxKaKG/+ts5JngRQT0entB6RL3h K8FzBdPMJd4Rf7bG9q7nMD/shDfM+tNu8PRyoZE+AhkUtz9S6AQDXHqDwqfmG0pwou0v Z+tw== X-Gm-Message-State: AGi0PuaDXaOXm0i/gyu53V1XgICSZyFINlKoFwC5PGIisIOopCN65sE1 zjropwlkzSk8BQx7dYmHs7DCjdXXOpc= X-Google-Smtp-Source: APiQypJo7ygMgW+KnrRXBnjxb0Unucm1rGmdoywYmGKodYLh+856fHHv0XOvVp3JN62HzYL0zjpDjQ== X-Received: by 2002:a6b:8d8d:: with SMTP id p135mr10697139iod.210.1588804170812; Wed, 06 May 2020 15:29:30 -0700 (PDT) Received: from localhost.localdomain (c-73-14-175-90.hsd1.co.comcast.net. [73.14.175.90]) by smtp.gmail.com with ESMTPSA id r3sm1756628iot.0.2020.05.06.15.29.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 15:29:30 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Sean Anderson , Simon Glass Subject: [PATCH 6/6] patman: Complain if a checkpatch line is not understood Date: Wed, 6 May 2020 16:29:09 -0600 Message-Id: <20200506222910.152322-7-sjg@chromium.org> X-Mailer: git-send-email 2.26.2.645.ge9eca65c58-goog In-Reply-To: <20200506222910.152322-1-sjg@chromium.org> References: <20200506222910.152322-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean Rather than suffering in silence, output a warning if something about the checkpatch output cannot be understood. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- tools/patman/checkpatch.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/patman/checkpatch.py b/tools/patman/checkpatch.py index 5ae450d771..98c63af1dd 100644 --- a/tools/patman/checkpatch.py +++ b/tools/patman/checkpatch.py @@ -143,6 +143,8 @@ def CheckPatch(fname, verbose=False): elif subject_match: item['file'] = '' item['line'] = None + else: + print('bad line "%s", %d' % (line, len(line))) return result