Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4909990imu; Tue, 15 Jan 2019 08:01:53 -0800 (PST) X-Google-Smtp-Source: ALg8bN5hPggpDZpGzq2S8WceO4exNed0Vt8FEsTAkDY8gcnJpW0bkEp6aG5g6pPS8ImJM6Px3Mqb X-Received: by 2002:a62:1e45:: with SMTP id e66mr4726660pfe.152.1547568112909; Tue, 15 Jan 2019 08:01:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547568112; cv=none; d=google.com; s=arc-20160816; b=Wqm1V+SCK8QeyxUbrGicvcgqq0B+qXTo1y6tw8SR8t+ieqihIYauakrnfTO0wM1Y/A o2L4mfRZv82FjC+4KYB+WfRwiQWcghH/wV4A4hWz6592kNocPzUYYFBK1fbKJyZHCShc KWrhK9i4Xk+qxnA6UAvra7EVmMPwAYcWT5ELketAna3vb6UfTHuDAAEA1kb5Bl3LDktf iLV/n+tWCLN5Uyjvwjnh0mDI4hBZEnbOkQI/MWSFVGJEB4eAawyd71a2ZVKBie4/s0y/ PWgpmTF95uaa0VkuzbyzOVOxD7sXe5Gw9erRX0TyXm5sVXKCeLrWy0GQDMv8jUnxEio/ 65Pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=35HXzyC9j8ZZD7Tm7WHi1c3B9DNSfqLxaJ+m6kscK/M=; b=TMeWOucw5RETDfXSsMYRv29IjgzK/tE54ONbGjgZOEzm3PleuWTGICkR+kQfRpJ9K0 JmIQOEzamMDFzqbAlTZjR9Wl+MJabGrkzikjoVSLc41/tbE4Y9caL8ubzYI9tfd+KGla ZwS1bz/QEPhRjiLGof5giXeZD6jenn3wvS57dyjo5VtxOKs2/Q+9YhWfdvUTy9MNJBau CI3+g4UeSKuGaxDU4PPHq/Ub+8Z81yPJyohofryKne+1VNKqr10cVbwVZk2+ENowZTIr f73NR1FugWe4rdU2qfWSLxh3ZFOYx2qO1NJfg+j356B6mTIA/lNnGjYy7oHlsEulnFdg Dvgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FvFQ8+eM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m7si3518048pgi.547.2019.01.15.08.01.34; Tue, 15 Jan 2019 08:01:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FvFQ8+eM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729993AbfAOOOZ (ORCPT + 99 others); Tue, 15 Jan 2019 09:14:25 -0500 Received: from mail-yb1-f196.google.com ([209.85.219.196]:42044 "EHLO mail-yb1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728612AbfAOOOY (ORCPT ); Tue, 15 Jan 2019 09:14:24 -0500 Received: by mail-yb1-f196.google.com with SMTP id q145so1076711ybq.9 for ; Tue, 15 Jan 2019 06:14:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=35HXzyC9j8ZZD7Tm7WHi1c3B9DNSfqLxaJ+m6kscK/M=; b=FvFQ8+eMSlZ08reOpbU7BXoiCGh+FXKcn2QSjwphZadhatLjPjU8MMzwr2yqQWlw9H C56whQ46ITeRPxXMPGkHal+ENj0WWxd7ryJ17L+ZDJ5UyAcFWp49gKJh4JOUv/ozSFjL V+wfpZmwpII3aVTvFNRAGsr1IG2gPbw+K4nR4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=35HXzyC9j8ZZD7Tm7WHi1c3B9DNSfqLxaJ+m6kscK/M=; b=pZSculDcPk08Jek7BIfoduM1rpuPeyM6xeyuqpCl5CzEnWB17PXZyodhUJJFtYKIZp 6ndfpfFaBei5Rw96DyEvSKkcGwkmpEHXGjsVpdSFFKYbVp409gVq99YMns2ULdFY46TS 4HaPogL7P8w+QYKS3uD1ZCmtxXStfTHh09+vmaYfQdseG6CmhcLHO4oh7kYZfCKBkv6g Iwdr38a8jGUiypUKELLHRUOz9MzG8/xBSoegM2+bXHWXBv6pZ1lnl2/lT8CUeYOFaQmg XXCfG6ySd8tSOQi8WM9nkn/8IeumUTKShDx+WbFQkmsG8j7WwhGkRb/nBoDoqtFgomXd dMcQ== X-Gm-Message-State: AJcUukdoHRrZ7ZurEYBXbRhbspf06POp2kU35WbRiJYkAvR2o/JEXc03 Xc/Gf9vLFu5lWvYaz8Z7M67BCzzGzjPCsMT1epXhKw== X-Received: by 2002:a25:4bc6:: with SMTP id y189mr3059776yba.195.1547561663384; Tue, 15 Jan 2019 06:14:23 -0800 (PST) MIME-Version: 1.0 References: <20190110111535.11235-1-anders.roxell@linaro.org> In-Reply-To: From: Anders Roxell Date: Tue, 15 Jan 2019 15:14:12 +0100 Message-ID: Subject: Re: [PATCH] dma: ixm-dma: fix warning comparison of distinct pointer types To: Fabio Estevam Cc: Vinod , Dan Williams , dmaengine@vger.kernel.org, linux-kernel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 14 Jan 2019 at 22:24, Fabio Estevam wrote: > > Hi Anders, > > On Thu, Jan 10, 2019 at 9:15 AM Anders Roxell = wrote: > > > > The warning got introduced by commit 930507c18304 ("arm64: add basic > > Kconfig symbols for i.MX8"). Since it got enabled for arm64. The warnin= g > > haven't been seen before since size_t was 'unsigned int' when built on > > arm32. > > > > ../drivers/dma/imx-dma.c: In function =E2=80=98imxdma_sg_next=E2=80=99: > > ../include/linux/kernel.h:846:29: warning: comparison of distinct point= er types lacks a cast > > (!!(sizeof((typeof(x) *)1 =3D=3D (typeof(y) *)1))) > > ^~ > > ../include/linux/kernel.h:860:4: note: in expansion of macro =E2=80=98_= _typecheck=E2=80=99 > > (__typecheck(x, y) && __no_side_effects(x, y)) > > ^~~~~~~~~~~ > > ../include/linux/kernel.h:870:24: note: in expansion of macro =E2=80=98= __safe_cmp=E2=80=99 > > __builtin_choose_expr(__safe_cmp(x, y), \ > > ^~~~~~~~~~ > > ../include/linux/kernel.h:879:19: note: in expansion of macro =E2=80=98= __careful_cmp=E2=80=99 > > #define min(x, y) __careful_cmp(x, y, <) > > ^~~~~~~~~~~~~ > > ../drivers/dma/imx-dma.c:288:8: note: in expansion of macro =E2=80=98mi= n=E2=80=99 > > now =3D min(d->len, sg_dma_len(sg)); > > ^~~ > > > > Rework so that we use min_t and pass in the size_t that returns the > > minimum of two values, using the specified type. > > > > Signed-off-by: Anders Roxell > > There is a typo in the Subject: s/ixm/imx/ and the prefix should be > dmaengine instead: > > dmaengine: imx-dma: fix warning comparison of distinct pointer types > > With that fixed: > > Reviewed-by: Fabio Estevam OK, thanks Fabio. Dan, do you want me to resend the patch with an updated shortlog or will you do that when you apply the patch? Cheers, Anders