Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2893381ybc; Thu, 14 Nov 2019 00:20:55 -0800 (PST) X-Google-Smtp-Source: APXvYqwUIAEczkCd8juvhKPpZkZUsOovJAXn9KDsdS42Kf+vqVDHDLC1jreT3vEY54eySNYdHSgr X-Received: by 2002:aa7:d552:: with SMTP id u18mr8577516edr.86.1573719655272; Thu, 14 Nov 2019 00:20:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573719655; cv=none; d=google.com; s=arc-20160816; b=p1TLvKvleg1tAGTyz+I0ClMvDDaKLKqDNry66jrehK5W19QNLkX1MVINrxJfG3Nuh4 emg6DnMZPYnIAc/enFQsAVTxxQajCipUWL8iNW6+4FygwNo/wOt+ousDQdRUil+cw55f Ni4V5OUctogiJm0fKS5vw2byPV6SA49GRMqqaFSnrqz+7o+W0Xn0Bzhdocwr2mXETsMa 4TDDuCRoKmDEvaA4z2aBVrrNu73bkHXN4QxYAET7U7xkvaewOmZCk8xo6U9FqnkuD0kW F/WhtfYN3lMaIym3+ChRonbYSv+ZeC7a5+ngfMUVLnvmtkYJICjXMFsYi6BQyPIMX2WN dKJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=JaJ/24ug8EOdA634pqQxtCQHNaGQDoT5QO/cUZAPyN8=; b=DjES05xa6SLajUe3WF7NuB440Pnw1cO2zuBGkQs2rw9I4PuixvHqIdNNT/SsB2eIWA A0sNBWOyhKDKFRtLpmgw6qj0+rQ7WsrG+lpqG4B+oCrSvJl7v2jjJyOiIeUV2tut1tNJ 1q++9d9ZHhIKYpAAOn3PoqmtSxNsueAkys+arIpR9bZevqwM7aHB/E2zKF4avdncq+jl lw/ZLvl6CBBNr9TOOOe8yOdjHS4eYZ+tmGdJaebA9SQV+nfqMCAtgcx24xuBDN0HA0UG KBc6XYwy9Y8d2JDW/71v3hJ1AC5q3J4KxGVaefuspK9dgEZajv856/hoZzCpmhqT1nR4 MdiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="ru/B8kdy"; 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 e48si3699049ede.207.2019.11.14.00.20.30; Thu, 14 Nov 2019 00:20:55 -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="ru/B8kdy"; 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 S1726214AbfKNITc (ORCPT + 99 others); Thu, 14 Nov 2019 03:19:32 -0500 Received: from mail-oi1-f193.google.com ([209.85.167.193]:39668 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725920AbfKNITc (ORCPT ); Thu, 14 Nov 2019 03:19:32 -0500 Received: by mail-oi1-f193.google.com with SMTP id v138so4501806oif.6 for ; Thu, 14 Nov 2019 00:19:29 -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; bh=JaJ/24ug8EOdA634pqQxtCQHNaGQDoT5QO/cUZAPyN8=; b=ru/B8kdyEF+8X/F+RYI6XxfAscZ4dA2WpcMuSnAZQ7WAJSxwzRdMQvN0jzwHqC9gN9 MNdMczMdLpc/WgDZiKA0LV/xvQbjtogEuJPVtriyZpBxNVtMzJlI+oRt+niwdo/rLmJq SQkLAyb+/Oxth0R0eRylxl43ZOHalSyElhvjecGxdIgxSnmH1HD73n0n3ItBzlLN4kzP 8xwpxzUDXL1C1A9HfYAWkdt+JGwVSfciyg18trUIu7EJzLAzcpqQDEvqrLrwU2hKN7Zm 0i71MX8xdta7xrSfgL1OLgWdJxIfsJyLI53J1jF2ZetcJHtkcJFN8uC5GF5LIY8Ixv2D NC1Q== 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; bh=JaJ/24ug8EOdA634pqQxtCQHNaGQDoT5QO/cUZAPyN8=; b=CGSmwYpt7o8iK3bCSPeU/EIA8vmG6TWfio1aUKklZrv0d9J8olNU1EkQXdL7bsxOJL JwVbgdAWW7pTJ9+WFjqX2ZjFydRKZ3booythMioJhygTJQ8Izx7qkRgxOQuruf3SKFjk Lgc8BPOo/QpNK+niwVqMr00hNCZqekpbT33Zjsbnn5DpC8NUER81BBicRH9Ms6Si7u64 mKmxQKuN+Ik3wFosJDuVO453M5Z1tcgCkYfsrqLFix0RnUTiLgt54YKaQsa264kJWxn8 G6/h6vlnKqi2IyoPebrqXG+1k95PBZ2VLI+yfpcMqlWN8mc8HYwEloixyDmFZhMcndK1 JSmA== X-Gm-Message-State: APjAAAU50idJ+goT97DyNIA9IR64NFIFM9P6dlzVz4cb9mWfZp7dnLrv Jx24HDtDmt2njZdP4a6/q1trzqBj79+F4cpFILs= X-Received: by 2002:aca:3f87:: with SMTP id m129mr2587853oia.30.1573719569553; Thu, 14 Nov 2019 00:19:29 -0800 (PST) MIME-Version: 1.0 References: <20191110052104.5502-1-gch981213@gmail.com> <201911121507.ANXNexIL%lkp@intel.com> In-Reply-To: <201911121507.ANXNexIL%lkp@intel.com> From: Chuanhong Guo Date: Thu, 14 Nov 2019 16:19:18 +0800 Message-ID: Subject: Re: [PATCH 1/2] mtd: mtk-quadspi: add support for DMA reading To: kbuild test robot Cc: kbuild-all@lists.01.org, linux-mtd@lists.infradead.org, Tudor Ambarus , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Matthias Brugger , linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, open list Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all! On Tue, Nov 12, 2019 at 3:29 PM kbuild test robot wrote: > [...] > All warnings (new ones prefixed by >>): > > drivers/mtd/spi-nor/mtk-quadspi.c: In function 'mtk_nor_read_dma_bounce': > >> drivers/mtd/spi-nor/mtk-quadspi.c:349:22: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] > mem_unaligned_len = (u32)buf % MTK_NOR_DMA_ALIGN; > ^ > drivers/mtd/spi-nor/mtk-quadspi.c: In function 'mtk_nor_read': > drivers/mtd/spi-nor/mtk-quadspi.c:369:6: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] > (u32)buffer % MTK_NOR_DMA_ALIGN || from % MTK_NOR_DMA_ALIGN) > ^ > DMA mode on this controller requires that source address, destination address and reading length should all be 16-byte aligned. And because of this, I didn't use the bounce buffer provided by spi-nor framework and allocate its own one. Should I just cast all these pointers to ulong or are there better ways to check for address alignments and/or obtain an aligned buffer? Regards, Chuanhong Guo