Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp56731pxk; Thu, 10 Sep 2020 23:38:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeR1/5Gy0z+jH+fNU4To+SaleZRTiKEQtKD6ziXKgfjbuSY7ECEPdjTKupr7BuoRBEFAuS X-Received: by 2002:a17:906:f1cf:: with SMTP id gx15mr591134ejb.241.1599806280582; Thu, 10 Sep 2020 23:38:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599806280; cv=none; d=google.com; s=arc-20160816; b=wMgipBjdM3HWPbYHsYwgqoyquoZZ7Nbb2G5iNQ1CYWjEbkPN0j/48ouZWgEqzNOISF UTeiKvdijAgPlS3N81d7QikYK4YJRWTItumNKA/dFsvx8nRBsAdFCNm3rx7BFE9ZwFOM r5JhLEWEC+8pEEVu/WopCXHItp1zWSmgqppPZl7fOdTuSGUYcqY5HT/9gCn9kaPiIUih MEaYvLMkJF/YLwpbzryt0E6rlzeR1gNcOCyD6WjVGxyDVzwBWJhZoFlH4K1YS5TXdmqg iCUYg4YmX1cdEM10uGhii8urzVIomopM1nuKbVUVMnQDQlfUz+/hY3Qpb2WhdxkOy+3Y jFDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=9DKpeWnPZq26QyH5OkPniwyoEsRqInfinXywisuXROM=; b=bBFMmKtFvsOIq2eQFNtIjfGczUAGcxRvkGzoNdL8Tyx2fWl9PpfldU9eNReXDBNzEu Z1QC42GjY1xOnaiTx+uYCODV9L8npwEftEv8szJG42hxxkFkO09JjqSwvfvszuCT5ip+ wDu1+dyQKvHstt7D7oD7BtoxneUQPPYJ7nvIWwlVwSxDnbotafkLLitHbf7ut0yjoS4I CXR3B2V5NUNvlJy4cb0xSrzE/h/bq4dgtBsBskO/4G1QUPlnbs2mXlpZ8ml0GIDn1Z3a EybVeUZ1QPAwH0g08YQkUn/yTo59XHjxrQJ1UXvcxrjp33XI6+G3anXfSZzAy8OkEnhX NlAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lt3si667132ejb.687.2020.09.10.23.37.25; Thu, 10 Sep 2020 23:38:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725536AbgIKGhC (ORCPT + 99 others); Fri, 11 Sep 2020 02:37:02 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:58878 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725784AbgIKGg7 (ORCPT ); Fri, 11 Sep 2020 02:36:59 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1kGcff-0007aQ-Uo; Fri, 11 Sep 2020 16:36:33 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Fri, 11 Sep 2020 16:36:31 +1000 Date: Fri, 11 Sep 2020 16:36:31 +1000 From: Herbert Xu To: Corentin Labbe Cc: davem@davemloft.net, mripard@kernel.org, wens@csie.org, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com Subject: Re: [PATCH v6 09/18] crypto: sun8i-ce: split into prepare/run/unprepare Message-ID: <20200911063631.GA19560@gondor.apana.org.au> References: <1599217803-29755-1-git-send-email-clabbe@baylibre.com> <1599217803-29755-10-git-send-email-clabbe@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1599217803-29755-10-git-send-email-clabbe@baylibre.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, Sep 04, 2020 at 11:09:54AM +0000, Corentin Labbe wrote: > > +static int sun8i_ce_cipher_unprepare(struct crypto_engine *engine, void *async_req) > +{ > + struct skcipher_request *areq = container_of(async_req, struct skcipher_request, base); > + struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(areq); > + struct sun8i_cipher_tfm_ctx *op = crypto_skcipher_ctx(tfm); > + struct sun8i_ce_dev *ce = op->ce; > + struct sun8i_cipher_req_ctx *rctx = skcipher_request_ctx(areq); > + struct sun8i_ce_flow *chan; > + struct ce_task *cet; > + unsigned int ivsize, offset; > + int nr_sgs = rctx->nr_sgs; > + int nr_sgd = rctx->nr_sgd; > + int flow; > + > + flow = rctx->flow; > + chan = &ce->chanlist[flow]; > + cet = chan->tl; > + ivsize = crypto_skcipher_ivsize(tfm); > + > + if (areq->src == areq->dst) { > + dma_unmap_sg(ce->dev, areq->src, nr_sgs, DMA_BIDIRECTIONAL); > + } else { > + if (nr_sgs > 0) > + dma_unmap_sg(ce->dev, areq->src, nr_sgs, DMA_TO_DEVICE); > + dma_unmap_sg(ce->dev, areq->dst, nr_sgd, DMA_FROM_DEVICE); > + } > + > + if (areq->iv && ivsize > 0) { > + if (cet->t_iv) > + dma_unmap_single(ce->dev, cet->t_iv, rctx->ivlen, > + DMA_TO_DEVICE); This creates a sparse warning: CHECK ../drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c ../drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c:311:25: warning: incorrect type in argument 2 (different base types) ../drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c:311:25: expected unsigned long long [usertype] addr ../drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c:311:25: got restricted __le32 [usertype] t_iv ../drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c:322:9: warning: incorrect type in argument 2 (different base types) ../drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c:322:9: expected unsigned long long [usertype] addr ../drivers/crypto/allwinner/sun8i-ce/sun8i-ce-cipher.c:322:9: got restricted __le32 [usertype] t_key Please fix. Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt