From patchwork Mon Nov 13 04:52:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 837335 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=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="fSj2RSJ4"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3yZyyV4qmVz9t2c for ; Mon, 13 Nov 2017 15:56:02 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 47C2DC21E3B; Mon, 13 Nov 2017 04:55:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 14089C21D64; Mon, 13 Nov 2017 04:53:32 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 3A10DC21E70; Mon, 13 Nov 2017 04:53:08 +0000 (UTC) Received: from mail-ot0-f194.google.com (mail-ot0-f194.google.com [74.125.82.194]) by lists.denx.de (Postfix) with ESMTPS id 1C401C21C51 for ; Mon, 13 Nov 2017 04:53:04 +0000 (UTC) Received: by mail-ot0-f194.google.com with SMTP id j29so9233533oth.13 for ; Sun, 12 Nov 2017 20:53:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=YFwLEychb+7/ynsP6MmRDW6B/+U0IvaIBgktPMvd/rI=; b=fSj2RSJ4wjqS790tyBBMCJRUAGbrIJ6YZk7tEktUKL84cN1gr0a8NJTKmxc/CAGy6x lM6CfMfW9ylFvnceZYvRcBl21D8f/QmXgDHEM7vzgeO9aGxOXNe6Jr22+Bk8psltSUCO Vw58A76boYmzkJCBV4/+EN24UOngnmZCer5MYsEZ93MCSrVfiH78/HqjmTFUhGUd4ngV RuyjgDCADxYCDwd16qIpc4GuVXiBKuFddVBe/002sirgyn6BzFhb9edWtdg30wXxfHHG VI1BHRyeEphGw1ZElWWQlJV+QfIQQxKN2QwEsXhs2wttNB/F+Ucm/+u5A8yhx/a5PYDh lW+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=YFwLEychb+7/ynsP6MmRDW6B/+U0IvaIBgktPMvd/rI=; b=gIaQxiTRjN8FmpcTLloHelhoU3u0sswSm4qzxxt9MKeIG/VNUnT6aRkot+/OPGx6xM jlBBFHeSrXRktg7b60q8AQYMrltUMNzSPdr5M4J+LbWbOieHg0TtXKHubFlOPJpSpwrT d65EzHHj/VTBbmlqRf8rqnT/4yMQK7f5kLSXcPlrbL2RdIp//as1VA8y73ZhjCjlxv8W c2sQYEb/tqCeLsWx5J2rLw7Hyp30BgescVNhb2WnOTi66MdbO6QSC6bPDejtPGgBrloO SQlOa7NeTKPCHFGg4AE+XBWql3DJSm+Q4KlMbmRdEyywCSJhjnKqBG5aly4yKCNYWHT+ Tzfw== X-Gm-Message-State: AJaThX4DoQVotjft+3bwb1Yx17WiE3ca89vdVOWKOB3aiCYpjSc6EINR rTCn3xN2S0AAx86XxFTDP8e/Pg== X-Google-Smtp-Source: AGs4zMaw0iqwkWxszayxOVQle3iGfjFgiS+crKjX4itxPecff7c20OO1WggwP3WqN49ZCMW3CXx8kA== X-Received: by 10.157.51.109 with SMTP id u42mr4709341otd.251.1510548782600; Sun, 12 Nov 2017 20:53:02 -0800 (PST) Received: from kiwi.bld.corp.google.com ([104.132.211.89]) by smtp.gmail.com with ESMTPSA id v21sm7334243ote.49.2017.11.12.20.53.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Nov 2017 20:53:01 -0800 (PST) Received: by kiwi.bld.corp.google.com (Postfix, from userid 121222) id 3048D142417; Sun, 12 Nov 2017 21:53:00 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Sun, 12 Nov 2017 21:52:12 -0700 Message-Id: <20171113045231.15911-9-sjg@chromium.org> X-Mailer: git-send-email 2.15.0.448.gf294e3d99a-goog In-Reply-To: <20171113045231.15911-1-sjg@chromium.org> References: <20171113045231.15911-1-sjg@chromium.org> Cc: Tom Rini Subject: [U-Boot] [PATCH 08/26] patman: Fix up tests to pass with newest checkpatch X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 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" The checkpatch tool was updated but the patman tests were not. Fix this. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- tools/patman/test.py | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/tools/patman/test.py b/tools/patman/test.py index 20dc9c1e0df..51145e83905 100644 --- a/tools/patman/test.py +++ b/tools/patman/test.py @@ -88,8 +88,7 @@ Signed-off-by: Simon Glass os.remove(expname) def GetData(self, data_type): - data=''' -From 4924887af52713cabea78420eff03badea8f0035 Mon Sep 17 00:00:00 2001 + data='''From 4924887af52713cabea78420eff03badea8f0035 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 7 Apr 2011 10:14:41 -0700 Subject: [PATCH 1/4] Add microsecond boot time measurement @@ -101,6 +100,7 @@ an available microsecond counter. %s --- README | 11 ++++++++ + MAINTAINERS | 3 ++ common/bootstage.c | 50 ++++++++++++++++++++++++++++++++++++ include/bootstage.h | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++ include/common.h | 8 ++++++ @@ -130,19 +130,31 @@ index 6f3748d..f9e4e65 100644 - Standalone program support: CONFIG_STANDALONE_LOAD_ADDR +diff --git a/MAINTAINERS b/MAINTAINERS +index b167b028ec..beb7dc634f 100644 +--- a/MAINTAINERS ++++ b/MAINTAINERS +@@ -474,3 +474,8 @@ S: Maintained + T: git git://git.denx.de/u-boot.git + F: * + F: */ ++ ++BOOTSTAGE ++M: Simon Glass ++L: u-boot@lists.denx.de ++F: common/bootstage.c diff --git a/common/bootstage.c b/common/bootstage.c new file mode 100644 index 0000000..2234c87 --- /dev/null +++ b/common/bootstage.c -@@ -0,0 +1,39 @@ +@@ -0,0 +1,37 @@ +/* + * Copyright (c) 2011, Google Inc. All rights reserved. + * + * SPDX-License-Identifier: GPL-2.0+ + */ + -+ +/* + * This module records the progress of boot and arbitrary commands, and + * permits accurate timestamping of each. The records can optionally be @@ -151,26 +163,25 @@ index 0000000..2234c87 + +#include + -+ +struct bootstage_record { -+ uint32_t time_us; ++ u32 time_us; + const char *name; +}; + +static struct bootstage_record record[BOOTSTAGE_COUNT]; + -+uint32_t bootstage_mark(enum bootstage_id id, const char *name) ++u32 bootstage_mark(enum bootstage_id id, const char *name) +{ + struct bootstage_record *rec = &record[id]; + + /* Only record the first event for each */ +%sif (!rec->name) { -+ rec->time_us = (uint32_t)timer_get_us(); ++ rec->time_us = (u32)timer_get_us(); + rec->name = name; + } + if (!rec->name && + %ssomething_else) { -+ rec->time_us = (uint32_t)timer_get_us(); ++ rec->time_us = (u32)timer_get_us(); + rec->name = name; + } +%sreturn rec->time_us; @@ -210,7 +221,7 @@ index 0000000..2234c87 self.assertEqual(result.errors, 0) self.assertEqual(result.warnings, 0) self.assertEqual(result.checks, 0) - self.assertEqual(result.lines, 56) + self.assertEqual(result.lines, 62) os.remove(inf) def testNoSignoff(self): @@ -221,18 +232,18 @@ index 0000000..2234c87 self.assertEqual(result.errors, 1) self.assertEqual(result.warnings, 0) self.assertEqual(result.checks, 0) - self.assertEqual(result.lines, 56) + self.assertEqual(result.lines, 62) os.remove(inf) def testSpaces(self): inf = self.SetupData('spaces') result = checkpatch.CheckPatch(inf) self.assertEqual(result.ok, False) - self.assertEqual(len(result.problems), 2) + self.assertEqual(len(result.problems), 3) self.assertEqual(result.errors, 0) - self.assertEqual(result.warnings, 2) + self.assertEqual(result.warnings, 3) self.assertEqual(result.checks, 0) - self.assertEqual(result.lines, 56) + self.assertEqual(result.lines, 62) os.remove(inf) def testIndent(self): @@ -243,7 +254,7 @@ index 0000000..2234c87 self.assertEqual(result.errors, 0) self.assertEqual(result.warnings, 0) self.assertEqual(result.checks, 1) - self.assertEqual(result.lines, 56) + self.assertEqual(result.lines, 62) os.remove(inf)