Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4023560imu; Mon, 14 Jan 2019 13:26:32 -0800 (PST) X-Google-Smtp-Source: ALg8bN65Dz+n465ttdXSyUk3F0oOhJ7ZNL8W2yjN89MTeCuGQs5deZn0xB7lGOPWwSXcSxDcT8uk X-Received: by 2002:a17:902:ac1:: with SMTP id 59mr575181plp.36.1547501191983; Mon, 14 Jan 2019 13:26:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547501191; cv=none; d=google.com; s=arc-20160816; b=eaWHaglRVLoC0aB1SxRpWOQg8KqgGIttZ6TxBUJAt6DwC0ujs4BzduVtOXfrqcf7wL ZcaHeyrAxk2gm8ej0yFtQR5vyqWCKqKkZgAR+gZx/3NrRcVCIWjImkDRNtOhAQTbKgy4 GkoOwke5wgxYoaHlRdrNo2Gu9eZlJmNQeU0osFe9HJpxW84OlYMWbOz1kF8CCKFqbooE 3SJ1lGMmHNUXanHZZx6aEfCQYKHfPPB0c15O9lbBdrRAMYcqQC4kHeoLXus+9gUqU1HP R2vRMOByXeeSAsIldU/v12zW3mA3xxaoLS83XKaxVT5fpmEsC1ecYLKfmCXrmN4tC1mb XVGA== 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=xJ/ylT/19yqf+Ot3Aee8LaSfXMxQMuuJ5PmyBRGbruA=; b=0uRddsxTgx+RD1nHfIFTk7KY0c+jiyg6kDvFOTgQuSEm7MY6OhuaNil7SMhaZZpl/z gtXbKsDbB0Q/pj2eHcF6jh6grdx5sVpA73XL3S/W5vjPQ2KFs05RiYMEuxHgJXedxVda zgeehVTSfotyditn1Rzz8GAd0zyZB22yAHAqx1uo70kviXzXflxUrmVjoGQ9fXPbH/1r q7WRFdz04RZAosjVHGykRMgxCW87XJSvvmTYljMzwfiD+Is2VcMwFGJk39reK3RYc48v +8bIwmlAPe9XbzeiHD+a6Pv3UQWrQQAzGoEDJzImMFbVbBgLAq1DYeO1m+zbTw6jOjE3 JH0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=uvpnV7lc; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z17si1373235pgc.364.2019.01.14.13.26.14; Mon, 14 Jan 2019 13:26:31 -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=@gmail.com header.s=20161025 header.b=uvpnV7lc; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727029AbfANVYE (ORCPT + 99 others); Mon, 14 Jan 2019 16:24:04 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:39771 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726911AbfANVYE (ORCPT ); Mon, 14 Jan 2019 16:24:04 -0500 Received: by mail-oi1-f196.google.com with SMTP id i6so443410oia.6; Mon, 14 Jan 2019 13:24:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=xJ/ylT/19yqf+Ot3Aee8LaSfXMxQMuuJ5PmyBRGbruA=; b=uvpnV7lc9uS6VZ9ruXn2KvY062usNiEJ0gfJg2lUP7ZSTjbRLGCHY2VqnwRCDbA8Y9 76adSIun/3m2Nz/s5sDnMQdE2IgSOxUm3siwSPjOKi9uF4le3Rf55OJ5KYWovIpzYbp8 e+BffSMavR99vDSfkJnJ3KYSmSjMd0Ns/kdCTEnRQrt9jl1P0G6aTSNUB3c9pX3L/zGa 7PsJ95RgTMXnOiCuGzjYgpNWte7hsCEP1LcXqtHy9H9l3M9hL4OQW9Tggx+R8acBJQpz 3h9V2B5mmgTOZNJ/hqIKoSiiKaOsdo9xes9OZp4F4sLfEI5+cbohGHU2KACyoiODzyPQ CSrA== 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=xJ/ylT/19yqf+Ot3Aee8LaSfXMxQMuuJ5PmyBRGbruA=; b=he7rOeNyIQofzZOc/rBeGNFVfUoJC3A5IwbFYM6TEsyN69OqHLRDNfNAViKSBqk12Q fn03pGZG5IXPC8qtbqvBO9wTfi1VrRxCg0hR99kUzoZ82+wOv6e7i0hLL7LMLyAH5od2 7PnlbjYiyeGWo13QQEJfc0QGkVaQRA1y/f3rN9NxhCSmCJSMGLbf8Swz5cfvz+aBC9RN lU41CgIa3WHRiCWFajV1IgHpWZp8mqgwbhITFYXkig9RKZpn3ScRawvJDWonhDSoYHpM 8Prt4FQvaoMcGhsXXy4/VI2uAhuXgmR2jaIP9aK3pgBSnVYvuqwbMpmT681b0VKioWqo 78aA== X-Gm-Message-State: AJcUukckIQK7IGIdTth+ehn4LvRMTotFUnlpDdIEDQrJMctX6xHruGnJ 09woWM8EQNF6iqeB/9nzR3EyAsJdCSZWHhle0bo= X-Received: by 2002:aca:6155:: with SMTP id v82mr230785oib.259.1547501042767; Mon, 14 Jan 2019 13:24:02 -0800 (PST) MIME-Version: 1.0 References: <20190110111535.11235-1-anders.roxell@linaro.org> In-Reply-To: <20190110111535.11235-1-anders.roxell@linaro.org> From: Fabio Estevam Date: Mon, 14 Jan 2019 19:24:29 -0200 Message-ID: Subject: Re: [PATCH] dma: ixm-dma: fix warning comparison of distinct pointer types To: Anders Roxell 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 Hi Anders, On Thu, Jan 10, 2019 at 9:15 AM Anders Roxell wr= ote: > > The warning got introduced by commit 930507c18304 ("arm64: add basic > Kconfig symbols for i.MX8"). Since it got enabled for arm64. The warning > 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 pointer= 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__t= ypecheck=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=98min= =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