From patchwork Sun Mar 3 20:51:28 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 2208741 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork1.kernel.org (Postfix) with ESMTP id B8FFB3FC8F for ; Sun, 3 Mar 2013 21:05:54 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UCFsk-0008U9-QM; Sun, 03 Mar 2013 20:51:42 +0000 Received: from moutng.kundenserver.de ([212.227.126.186]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UCFsf-0008Tc-SK for linux-arm-kernel@lists.infradead.org; Sun, 03 Mar 2013 20:51:40 +0000 Received: from klappe2.localnet (HSI-KBW-46-223-90-92.hsi.kabel-badenwuerttemberg.de [46.223.90.92]) by mrelayeu.kundenserver.de (node=mreu4) with ESMTP (Nemesis) id 0LhpBu-1UXVoH18lu-00n8JF; Sun, 03 Mar 2013 21:51:31 +0100 From: Arnd Bergmann To: kbuild test robot Subject: Re: drivers/dma/dw_dmac.c:1278:48: sparse: incorrect type in argument 1 (different base types) Date: Sun, 3 Mar 2013 20:51:28 +0000 User-Agent: KMail/1.12.2 (Linux/3.8.0-8-generic; KDE/4.3.2; x86_64; ; ) References: <5133ae8b.eQXjkB7tQEqiUMck%fengguang.wu@intel.com> In-Reply-To: <5133ae8b.eQXjkB7tQEqiUMck%fengguang.wu@intel.com> MIME-Version: 1.0 Message-Id: <201303032051.28444.arnd@arndb.de> X-Provags-ID: V02:K0:mA4jYPsq2tatpE+OZyYT9JrccS0jUBLIuCm5VRzMOTC GM0OZ0/LaFDnl1V8P/nsU6XBT3eFkNkpL1mqC4QTXtmSbKNMcv BvOR0PIY8oxIgf5mgXodbCrQPW+AfGHOxsYM91lb/rxDHV9DtD juVemWqFH+4y1SdHFbuIXlr2RcMPLbEl5u9wFatNY9m8A2BVfY 9Rr7fsAhpEiQt+zmy4G4MtTQJqD3G4MwgNFnMJrXwYDp0ZrhZu E5sNlX0dUDWC8WMYSgjBH9NocbDPb+vFgTDKXM7BouoWW5Mv6X Muv2GFLZW8YgPtN0FsHxQl3FNqiD2wy2BS2MJHPKB6Cra0dlT9 Jcxh5Z2IUzAWr1F+Jy4w= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130303_155138_159174_B081E236 X-CRM114-Status: GOOD ( 10.83 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.126.186 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 T_FRT_LITTLE BODY: ReplaceTags: Little -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Vinod Koul , Viresh Kumar , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org On Sunday 03 March 2013, kbuild test robot wrote: > >> drivers/dma/dw_dmac.c:1278:48: sparse: incorrect type in argument 1 (different base types) > drivers/dma/dw_dmac.c:1278:48: expected restricted __be32 const [usertype] *p > drivers/dma/dw_dmac.c:1278:48: got unsigned int * > >> drivers/dma/dw_dmac.c:1279:48: sparse: incorrect type in argument 1 (different base types) > drivers/dma/dw_dmac.c:1279:48: expected restricted __be32 const [usertype] *p > drivers/dma/dw_dmac.c:1279:48: got unsigned int * > >> drivers/dma/dw_dmac.c:1280:48: sparse: incorrect type in argument 1 (different base types) > drivers/dma/dw_dmac.c:1280:48: expected restricted __be32 const [usertype] *p > drivers/dma/dw_dmac.c:1280:48: got unsigned int * > Cool, thanks for the notification! That is a real bug, the variables are already endian swapped at this point. Fortunately, nothing is using that code at this moment, so we can fix this with no hurry. Vinod, could you apply this patch? Arnd 8<------- Subject: [PATCH] dmaengine: dw_dma: fix endianess for DT xlate function As reported by Wu Fengguang's build robot tracking sparse warnings, the dma_spec arguments in the dw_dma_xlate are already byte swapped on littl-endian platforms and must not get swapped again. This code is currently not used anywhere, but will be used in Linux 3.10 when the ARM SPEAr platform starts using the generic DMA DT binding. Signed-off-by: Arnd Bergmann Acked-by: Viresh Kumar diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index c599558..eb81ec9 100644 --- a/drivers/dma/dw_dmac.c +++ b/drivers/dma/dw_dmac.c @@ -1276,9 +1276,9 @@ static struct dma_chan *dw_dma_xlate(struct of_phandle_args *dma_spec, if (dma_spec->args_count != 3) return NULL; - fargs.req = be32_to_cpup(dma_spec->args+0); - fargs.src = be32_to_cpup(dma_spec->args+1); - fargs.dst = be32_to_cpup(dma_spec->args+2); + fargs.req = dma_spec->args[0]; + fargs.src = dma_spec->args[1]; + fargs.dst = dma_spec->args[2]; if (WARN_ON(fargs.req >= DW_DMA_MAX_NR_REQUESTS || fargs.src >= dw->nr_masters ||