From patchwork Tue Dec 8 15:23:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 7798781 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: X-Original-To: patchwork-linux-crypto@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8C945BEEE1 for ; Tue, 8 Dec 2015 15:25:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B77F120377 for ; Tue, 8 Dec 2015 15:24:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E55DE20376 for ; Tue, 8 Dec 2015 15:24:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965150AbbLHPYt (ORCPT ); Tue, 8 Dec 2015 10:24:49 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:49593 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750904AbbLHPYs (ORCPT ); Tue, 8 Dec 2015 10:24:48 -0500 Received: from wuerfel.localnet ([134.3.118.24]) by mrelayeu.kundenserver.de (mreue001) with ESMTPSA (Nemesis) id 0MB6xw-1ZwNyB1pUS-009xMq; Tue, 08 Dec 2015 16:23:55 +0100 From: Arnd Bergmann To: Herbert Xu , linux-crypto@vger.kernel.org Cc: "David S. Miller" , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/2] crypto: sahara: fix 64-bit dma_addr_t compilation Date: Tue, 08 Dec 2015 16:23:51 +0100 Message-ID: <1707164.bU6CqSGiie@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1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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 hardware uses DMA descriptors with 32-bit addresses, but dma_addr_t is variable size depending on whether we want to support any devices that use 64-bit DMA addresses in hardware. This means that the definition of the DMA descriptor structure is wrong, and we helpfully get a compiler warning about them too: drivers/crypto/sahara.c:423:372: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'dma_addr_t {aka long long unsigned int}' [-Wformat=] This changes the definition of the sahara_hw_desc and sahara_hw_link structures to only contain fixed-length members, which is required to make the driver work on ARM LPAE mode, and avoids most of the gcc warnings we get. Signed-off-by: Arnd Bergmann --- drivers/crypto/sahara.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c index cc738f3592a3..38bf12ae5589 100644 --- a/drivers/crypto/sahara.c +++ b/drivers/crypto/sahara.c @@ -130,18 +130,18 @@ #define SAHARA_REG_IDAR 0x20 struct sahara_hw_desc { - u32 hdr; - u32 len1; - dma_addr_t p1; - u32 len2; - dma_addr_t p2; - dma_addr_t next; + u32 hdr; + u32 len1; + u32 p1; + u32 len2; + u32 p2; + u32 next; }; struct sahara_hw_link { - u32 len; - dma_addr_t p; - dma_addr_t next; + u32 len; + u32 p; + u32 next; }; struct sahara_ctx {