Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp3143025pxv; Sun, 27 Jun 2021 20:27:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEsdIFgvyif4kj+nKwZRSW8h+46EUnXabZ6sQVS4/4juPpAxX/+UfNujQ38+GDZh7mbxqI X-Received: by 2002:a05:6402:100e:: with SMTP id c14mr29409865edu.51.1624850863845; Sun, 27 Jun 2021 20:27:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624850863; cv=none; d=google.com; s=arc-20160816; b=GM5ykLl/mTBFsW8J3kZcTXWfWGzLuqOvAyJ9Ebxq9q3NXZU5/d86kATmXjPBeRmUld rAVo6il+ZYAQ2ZBEtthJUpp36BeAYniI9hswO9LsthlgZCtwDMrVIpmrMsGXxMtY/leW UUI8rlA3ucUFE7V9fxnVc8CC1V0aLSI2xqNT6fei/10XJ3L48zoxaiOuAJwfXqowqNKH wSFtM/USoDjol/X9Z8FMkxzvs8gwGUroTwlyb8uUqnYBmf4RddW1z/2mFO3VbXBnQ/k7 JTou3h5vpYwFJMU/SxcCBWhDXYifxjITe2vBHNJ2Ylu0qKkvUD+0yEaoM3S/sbUHt/jC HnMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=wbcSqOKkXyeHTvLewaZ7SyDCOqR5QF7KeNUoZutgvfI=; b=Xmcgj/ORXmXvMvgGxjoHdE0whea/TGNWfi4ce0G0KYh9DfHihM2T0eeKxBABI8CS1u 4fcHKa0EdUfSUg5NuQOo6aDGhIviO5UUHv8Pkg8FRSInE7cN8YpmL+UO7TrpWDVtuIXV Wxxr1ojM/calLH5EtK9cwpEkL9h1RWT0Q9TosnzodZNaWsmhnIPIcAwRNi++Xr2gKhuv pgX9pVJul3Qzra86uAcZuqiD0hJ6CsPlLD3fwX6S+ZEpvNw0IkMihS/WaQ8znIt2NO7S dsZrIncqqyEG1g0jUwPdbhvbpfYb1q5PI6yV6nellBjvxervHwqVH9FbT85jFbb1vOqE wJew== 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 l19si13042664eje.408.2021.06.27.20.27.06; Sun, 27 Jun 2021 20:27:43 -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 S231978AbhF1D16 (ORCPT + 99 others); Sun, 27 Jun 2021 23:27:58 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:51010 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231678AbhF1D16 (ORCPT ); Sun, 27 Jun 2021 23:27:58 -0400 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtp (Exim 4.92 #5 (Debian)) id 1lxhts-0001or-E8; Mon, 28 Jun 2021 11:25:32 +0800 Received: from herbert by gondobar with local (Exim 4.92) (envelope-from ) id 1lxhti-00011F-BY; Mon, 28 Jun 2021 11:25:22 +0800 Date: Mon, 28 Jun 2021 11:25:22 +0800 From: Herbert Xu To: Sean Anderson Cc: linux-crypto@vger.kernel.org, "David S . Miller" , Aymen Sghaier , linux-arm-kernel@lists.infradead.org, Marek Vasut , Horia =?utf-8?Q?Geant=C4=83?= Subject: Re: [PATCH 2/2] crypto: mxs_dcp: Use sg_mapping_iter to copy data Message-ID: <20210628032522.GA1375@gondor.apana.org.au> References: <20210618211411.1167726-1-sean.anderson@seco.com> <20210618211411.1167726-2-sean.anderson@seco.com> <20210624065644.GA7826@gondor.apana.org.au> <20210625001640.GA23887@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Fri, Jun 25, 2021 at 10:49:08AM -0400, Sean Anderson wrote: > > What version of sparse are you using? With sparse 0.6.2, gcc 9.3.0, and > with C=1 and W=2 I don't see this warning. OK I've upgraded my sparse to the latest git tree, but it still gives the same warning, because the two types are of different sizes: $ make C=1 W=1 O=build-compile drivers/crypto/ make[1]: Entering directory '/home/herbert/src/build/kernel/test/build-compile' GEN Makefile CALL ../scripts/checksyscalls.sh CALL ../scripts/atomic/check-atomics.sh CC [M] drivers/crypto/mxs-dcp.o In file included from ../include/linux/kernel.h:15, from ../arch/x86/include/asm/percpu.h:27, from ../arch/x86/include/asm/current.h:6, from ../include/linux/sched.h:12, from ../include/linux/ratelimit.h:6, from ../include/linux/dev_printk.h:16, from ../include/linux/device.h:15, from ../include/linux/dma-mapping.h:7, from ../drivers/crypto/mxs-dcp.c:8: ../drivers/crypto/mxs-dcp.c: In function \u2018mxs_dcp_aes_block_crypt\u2019: ../include/linux/minmax.h:18:28: warning: comparison of distinct pointer types lacks a cast (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1))) ^~ ../include/linux/minmax.h:32:4: note: in expansion of macro \u2018__typecheck\u2019 (__typecheck(x, y) && __no_side_effects(x, y)) ^~~~~~~~~~~ ../include/linux/minmax.h:42:24: note: in expansion of macro \u2018__safe_cmp\u2019 __builtin_choose_expr(__safe_cmp(x, y), \ ^~~~~~~~~~ ../include/linux/minmax.h:51:19: note: in expansion of macro \u2018__careful_cmp\u2019 #define min(x, y) __careful_cmp(x, y, <) ^~~~~~~~~~~~~ ../drivers/crypto/mxs-dcp.c:369:12: note: in expansion of macro \u2018min\u2019 rem = min(dst_iter.length, actx->fill); ^~~ CHECK ../drivers/crypto/mxs-dcp.c ../drivers/crypto/mxs-dcp.c:369:47: error: incompatible types in comparison expression (different type sizes): ../drivers/crypto/mxs-dcp.c:369:47: unsigned long * ../drivers/crypto/mxs-dcp.c:369:47: unsigned int * make[1]: Leaving directory '/home/herbert/src/build/kernel/test/build-compile' $ In fact as you can see that gcc is warning too. Perhaps you're building on 32-bit? Thanks, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt