From patchwork Tue Dec 8 15:24:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 7798821 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C07079F387 for ; Tue, 8 Dec 2015 15:26:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DB53F20499 for ; Tue, 8 Dec 2015 15:26:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 10F27204D2 for ; Tue, 8 Dec 2015 15:26:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756814AbbLHPZY (ORCPT ); Tue, 8 Dec 2015 10:25:24 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:54926 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750904AbbLHPZU (ORCPT ); Tue, 8 Dec 2015 10:25:20 -0500 Received: from wuerfel.localnet ([134.3.118.24]) by mrelayeu.kundenserver.de (mreue104) with ESMTPSA (Nemesis) id 0Lw1TZ-1aKe753nQ5-017pXB; Tue, 08 Dec 2015 16:24:26 +0100 From: Arnd Bergmann To: Herbert Xu Cc: linux-crypto@vger.kernel.org, "David S. Miller" , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/2] crypto: sahara: fix debug output for 64-bit dma_addr_t Date: Tue, 08 Dec 2015 16:24:22 +0100 Message-ID: <2836331.cLKdbzEk5h@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1707164.bU6CqSGiie@wuerfel> References: <1707164.bU6CqSGiie@wuerfel> MIME-Version: 1.0 X-Provags-ID: V03:K0:ZnOC92NCNzyW+DZKklmNVWSCxDSPpiKzEGFh8cLnpD31lmx6Ldl MmbsR1xZaf/EaEYDMc/Q0/Nurfj2ddDy7g9EU4Ylm47rp1prIa/7aSCKcOoBQuFpKUnP7dz sWSQ4UU9HRPKsaKtvmKbOG0a8Lz+0PEAveuCiVmvwUT7cP3LygXsNSVRoUUtpjm3WXB/6XY ssleX5Ajgg2KtBrd7DXAA== X-UI-Out-Filterresults: notjunk:1; V01:K0:FUJpbHJMfpQ=:GLlu/umXyVwU78jI6KnA3x 3nvk1GLN2dLcf1n2g0pLKeHUiYA4/Oiuue9qxN0A/hRjpgxLvxMucomqr5XvKyP13A1aTHu7A JDyb55v82j28IU1O9KtmxNNKdxKgjm/4+c5nsJ1pjFHZC4ZW4jwrlxM7dWDPls5PY+NZiUt3Z 318bmz2UtfWJkvHPsGvTrhj/MQywndJK4ZXYOMzgkuydpaiKXrhBpDl/0z70Qgs91hx8UeYwZ BFTqmNo7Qf2yjnlkcRO2P5talcMyip66FhYRZe4QRquflRVaOIi8Iek41kSjLpbs9JTz/pR7O e6N6pdp+iEZugsInskjSpvmRB4e7EhNSFN128Orh0fsrkiWm781mI5jBnOsJRaQjkApL3N136 nmbSL9pVQqHEA1qCSuFip2d5cAATNAMcFPBZIpEimlqv4HS+6Af2cJpsHj8E18sc9k6wFSzJX Vl3vkz4xJhoScCZ+jD/2Gw6CQzF0aDIMnV3Ohd7TIcgoZ6Hw2FIsI7M+ZsOt3NPpraur6OMsB dZKbT/V52GKTUX62gGSSlBS3H+6Lie2jEYLcKX2ekPkr02v7J4BGrO97GKrS73OXHhEmnq/Ye ligIqu/IUdngf2zUHQrLKW5KkqXHLGMNde9dlICXPAWrXqlDS/ZUHH+fgedrxnDbBQslPHMSk CzEVnuHyvFocRvqYLOejwZQIyddMNz2Cv+j54oDOIS4AA01aL54wlcyd05lp74ONnprHoTEyf qm+hRrL7djHD/MiG Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The sahara_dump_descriptors and sahara_dump_links functions attempt to print a dma_addr_t value with a 0x%08x format string, which produces a warning when dma_addr_t is 64-bit wide: drivers/crypto/sahara.c:419:120: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'dma_addr_t {aka long long unsigned int}' [-Wformat=] This changes the code to use the %pad format string that is meant for dma_addr_t, which avoids the warning and gives us the correct output in all configurations. Signed-off-by: Arnd Bergmann --- drivers/crypto/sahara.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index 38bf12ae5589..6c4f91c5e6b3 100644 --- a/drivers/crypto/sahara.c +++ b/drivers/crypto/sahara.c @@ -416,8 +416,8 @@ static void sahara_dump_descriptors(struct sahara_dev *dev) return; for (i = 0; i < SAHARA_MAX_HW_DESC; i++) { - dev_dbg(dev->device, "Descriptor (%d) (0x%08x):\n", - i, dev->hw_phys_desc[i]); + dev_dbg(dev->device, "Descriptor (%d) (%pad):\n", + i, &dev->hw_phys_desc[i]); dev_dbg(dev->device, "\thdr = 0x%08x\n", dev->hw_desc[i]->hdr); dev_dbg(dev->device, "\tlen1 = %u\n", dev->hw_desc[i]->len1); dev_dbg(dev->device, "\tp1 = 0x%08x\n", dev->hw_desc[i]->p1); @@ -437,8 +437,8 @@ static void sahara_dump_links(struct sahara_dev *dev) return; for (i = 0; i < SAHARA_MAX_HW_LINK; i++) { - dev_dbg(dev->device, "Link (%d) (0x%08x):\n", - i, dev->hw_phys_link[i]); + dev_dbg(dev->device, "Link (%d) (%pad):\n", + i, &dev->hw_phys_link[i]); dev_dbg(dev->device, "\tlen = %u\n", dev->hw_link[i]->len); dev_dbg(dev->device, "\tp = 0x%08x\n", dev->hw_link[i]->p); dev_dbg(dev->device, "\tnext = 0x%08x\n",