From patchwork Tue Jan 16 07:43:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 861316 X-Patchwork-Delegate: boris.brezillon@free-electrons.com 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.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="k2+z4jW3"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zLMgS2l2Zz9s83 for ; Tue, 16 Jan 2018 18:44:36 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=uhBZftcNTVNwg2W/6MpjPZp34lQRiHTQiF+yBxRf/A0=; b=k2+ z4jW33oKmkts06dWBXP702mrtYUnpAHjnvHBBSjNlTyozWqYsICESmnhkmP4pEXbiQqaaHaMWtHXP W5p2SOCtwbYMZjXCc1OkTNHyjLb8cRZNsUhnpzhVzgd30tzg6nTciTdget6rB8LAGvdRD+CyjZtaQ t8rC8P51/41DNKnJbMbgdvBH5S36IFQsyJ9H2MEH9lqVxt+1mjqO7c3bvXArwKWtiunZJfpP0GnHR feYrYIaqsEqNxrGiqKLmZ3UX/09FNJBRPmlLQfJ0KwN7EXYHiia101c3l0iA1BGAaNsmfHevXvrx8 lnQi+wlKnfSdOTmvhBXdonHdiNAbLQw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ebLv3-0006Qf-Cv; Tue, 16 Jan 2018 07:44:29 +0000 Received: from mout.kundenserver.de ([212.227.17.10]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ebLuz-0006Bi-Td for linux-mtd@lists.infradead.org; Tue, 16 Jan 2018 07:44:27 +0000 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue103 [212.227.15.145]) with ESMTPA (Nemesis) id 0Lby3Y-1fI4f70fnY-00jKTD; Tue, 16 Jan 2018 08:44:01 +0100 From: Arnd Bergmann To: Kyungmin Park , David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , Cyrille Pitchen Subject: [PATCH] mtd: onenand: omap2: print resource using %pR format string Date: Tue, 16 Jan 2018 08:43:40 +0100 Message-Id: <20180116074359.2861596-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:7AMxCGvw6hfnlb7TIakWzsSdvmDNaIJxax5lIr5Se70yy2S00tn p2yx7lSAH2j8H9W4DQPuveEHXs2lE+ppp6tcf3WbDNfXM4VHPqXMSj+xbBt296p9pUVtl3Y fYdTdhAGjjtopmnSnDuHt9+88InJ70kth2CHhlJaVyRhsxneinfi2c7/yPCa2DEE8s3NqKH H+oE8n7YRabQnk3FBwfFw== X-UI-Out-Filterresults: notjunk:1; V01:K0:0EFJ3f5OEcw=:tWAE/6YSW7FkO9iRwi0LiU iyN6drkShAyWldNL7PwxLC0kZM8bs4YC34Y8M4pRziG+XqZR4P/JKZXHSofIoOe7+GfnCcdrw BJ/PrW8lzk5xiUw+2afbSpm75R8BoUuJqQrMsGD0CKWAaYtMW5ZExQ/RHQSoqToay4fakCTsx CzIOE/TV4BG2CzjH9TOZ8HL7ORrM78bWnFlUByLfXJG7qqDgKPGqVT3jmRkDY6uO2TC9xHM4b ZK2dSK87brgw0VBblXR3aJJxDbF1QqJ2jzH7z5pm5RKmBwIQOaNAwhPBqAygxjPHxzhpHzwQ+ PMCp6q4yx9m1P3/MyRdpxiMAfiDJF+8HJoE9wnsW4bRvRXNrAlyIeJjodqPWmr3N6HVO/Cs46 ets98vV8D1MfCZmMGFZBNSqdFS296EkcS5tT/dXfXfNOU5S01bYhZCzfgnb8Dr49n98ru+Vhx 8aXESSL6UfDS1fX37N0SB2wdBBttUUjOrv1ouW9FTSrDWI0Cy9DoG2nI/MrGAhcChM7q2vYLX FkAwp4kflkJ6jD+ULVvlMzfXzOOte8cy0jTRXc1mh8zugJT2R+TcF75xaADY7oxjTK9U57PPi JkcSGTY6m9vyWUu71Jx+Ef1r3VOcA3xpA6wciuRY0gefK1xP8QFSw+GsCTpINPyj21CSzcNmL j03UuumT8f08exJuD0KMS4hYyElIG+l+A52CEBJxNl8mb41125m3zF+zFv7hY8elsSAphPue0 aa0jWEXKA3jAoiwpxM2ES70mUoupzop6Qc9zvg== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180115_234426_314705_3187C70E X-CRM114-Status: GOOD ( 10.51 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.17.10 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.10 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ladislav Michl , Arnd Bergmann , Sebastian Reichel , linux-kernel@vger.kernel.org, Peter Ujfalusi , linux-mtd@lists.infradead.org, Roger Quadros MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org The omap2 onenand driver is now available for compile-testing, which uncovers a warning in configurations that have a 64-bit resource_size_t: drivers/mtd/onenand/omap2.c: In function 'omap2_onenand_probe': drivers/mtd/onenand/omap2.c:536:54: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'resource_size_t {aka long long unsigned int}' [-Werror=format=] dev_err(dev, "Cannot reserve memory region at 0x%08x, size: 0x%x\n", drivers/mtd/onenand/omap2.c:536:66: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t {aka long long unsigned int}' [-Werror=format=] Changing the format string to the special %pR simplifies the code and lets it do the right thing in that configuration, while avoiding the warning. Fixes: a758f50f10cf ("mtd: onenand: omap2: Configure driver from DT") Signed-off-by: Arnd Bergmann Reviewed-by: Sebastian Reichel Reviewed-by: Peter Ujfalusi --- drivers/mtd/onenand/omap2.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c index 2ce73fb6da1c..a4a2159bcfb7 100644 --- a/drivers/mtd/onenand/omap2.c +++ b/drivers/mtd/onenand/omap2.c @@ -533,8 +533,7 @@ static int omap2_onenand_probe(struct platform_device *pdev) c->onenand.base = devm_ioremap_resource(dev, res); if (IS_ERR(c->onenand.base)) { - dev_err(dev, "Cannot reserve memory region at 0x%08x, size: 0x%x\n", - res->start, resource_size(res)); + dev_err(dev, "Cannot reserve memory region %pR\n", res); return PTR_ERR(c->onenand.base); }