Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758049AbcCUXmx (ORCPT ); Mon, 21 Mar 2016 19:42:53 -0400 Received: from mleia.com ([178.79.152.223]:52500 "EHLO mail.mleia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756202AbcCUXmv (ORCPT ); Mon, 21 Mar 2016 19:42:51 -0400 From: Vladimir Zapolskiy To: Daniel Lezcano , Thomas Gleixner Cc: linux-kernel@vger.kernel.org, Jisheng Zhang , Ezequiel Garcia Subject: [PATCH] clocksource/drivers/pistachio: Correct output format of PTR_ERR() Date: Tue, 22 Mar 2016 01:42:07 +0200 Message-Id: <1458603727-4446-1-git-send-email-vz@mleia.com> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-49551924 X-CRM114-CacheID: sfid-20160321_234654_801220_30DBC4B8 X-CRM114-Status: GOOD ( 10.57 ) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1448 Lines: 39 Use signed integer output in the pr_err() string format, here PTR_ERR() value is negative and it should be reported in human readable way. Signed-off-by: Vladimir Zapolskiy Cc: Jisheng Zhang Cc: Ezequiel Garcia --- I've occasionally found this issue, which most probably is copy-pasted from/to drivers/clocksource/time-lpc32xx.c and recently fixed by commit d662ed204357 ("clocksource/drivers/lpc32: Correct pr_err() output format"). drivers/clocksource/time-pistachio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clocksource/time-pistachio.c b/drivers/clocksource/time-pistachio.c index 3269d9e..376e59b 100644 --- a/drivers/clocksource/time-pistachio.c +++ b/drivers/clocksource/time-pistachio.c @@ -163,7 +163,7 @@ static void __init pistachio_clksrc_of_init(struct device_node *node) periph_regs = syscon_regmap_lookup_by_phandle(node, "img,cr-periph"); if (IS_ERR(periph_regs)) { - pr_err("cannot get peripheral regmap (%lu)\n", + pr_err("cannot get peripheral regmap (%ld)\n", PTR_ERR(periph_regs)); return; } @@ -176,7 +176,7 @@ static void __init pistachio_clksrc_of_init(struct device_node *node) sys_clk = of_clk_get_by_name(node, "sys"); if (IS_ERR(sys_clk)) { - pr_err("clock get failed (%lu)\n", PTR_ERR(sys_clk)); + pr_err("clock get failed (%ld)\n", PTR_ERR(sys_clk)); return; } -- 2.1.4