From patchwork Tue May 14 17:20:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Vincent_Stehl=C3=A9?= X-Patchwork-Id: 2568211 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id AA73CDF24C for ; Tue, 14 May 2013 17:21:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753207Ab3ENRVH (ORCPT ); Tue, 14 May 2013 13:21:07 -0400 Received: from smtp1-g21.free.fr ([212.27.42.1]:38997 "EHLO smtp1-g21.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751971Ab3ENRVG (ORCPT ); Tue, 14 May 2013 13:21:06 -0400 Received: from romuald.bergerie (unknown [88.178.86.202]) by smtp1-g21.free.fr (Postfix) with ESMTP id 6A8A6940075; Tue, 14 May 2013 19:20:56 +0200 (CEST) Received: by romuald.bergerie (Postfix, from userid 1000) id B54371A819A; Tue, 14 May 2013 19:20:55 +0200 (CEST) From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= To: Tony Lindgren Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Vincent=20Stehl=C3=A9?= , trivial@kernel.org Subject: [PATCH, v2] ARM: omap2: gpmc: fix compilation warning Date: Tue, 14 May 2013 19:20:43 +0200 Message-Id: <1368552043-3764-1-git-send-email-vincent.stehle@laposte.net> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <20130508222639.GM32546@atomide.com> References: <20130508222639.GM32546@atomide.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Vincent Stehlé Fix the following compilation warning: arch/arm/mach-omap2/gpmc.c: In function 'gpmc_probe_generic_child': arch/arm/mach-omap2/gpmc.c:1477:4: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t' [-Wformat] Signed-off-by: Vincent Stehlé Cc: trivial@kernel.org --- Tony wrote: > You should just change the format for dev_err instead of the casting. Hi, Sorry for the late answer; it seems this is a bit more complicated after all, as res.start can be 32b or 64b in LPAE. The common solution seems to be: cast to long long in all cases and print accordingly. Would you like this better? Best regards, V. arch/arm/mach-omap2/gpmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index 6c4da12..e74501e 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c @@ -1473,8 +1473,8 @@ static int gpmc_probe_generic_child(struct platform_device *pdev, */ ret = gpmc_cs_remap(cs, res.start); if (ret < 0) { - dev_err(&pdev->dev, "cannot remap GPMC CS %d to 0x%x\n", - cs, res.start); + dev_err(&pdev->dev, "cannot remap GPMC CS %d to 0x%llx\n", + cs, (long long)res.start); goto err; }