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: 245250 List-Id: U-Boot discussion From: sjg at chromium.org (Simon Glass) Date: Wed, 6 May 2020 16:29:04 -0600 Subject: [PATCH 1/6] patman: Fix 'warning' typo In-Reply-To: <20200506222910.152322-1-sjg@chromium.org> References: <20200506222910.152322-1-sjg@chromium.org> Message-ID: <20200506222910.152322-2-sjg@chromium.org> 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 --- 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()