From patchwork Fri Sep 14 19:13:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Dureghello X-Patchwork-Id: 10601157 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 400AC15A7 for ; Fri, 14 Sep 2018 19:13:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22F412B9E2 for ; Fri, 14 Sep 2018 19:13:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 173B22BA29; Fri, 14 Sep 2018 19:13:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 054612B9E2 for ; Fri, 14 Sep 2018 19:13:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726849AbeIOA3n (ORCPT ); Fri, 14 Sep 2018 20:29:43 -0400 Received: from ec2-18-194-220-216.eu-central-1.compute.amazonaws.com ([18.194.220.216]:38254 "EHLO sysam.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726748AbeIOA3n (ORCPT ); Fri, 14 Sep 2018 20:29:43 -0400 Received: from localhost (localhost [127.0.0.1]) by sysam.it (Postfix) with ESMTP id D6C8921E0C; Fri, 14 Sep 2018 19:13:52 +0000 (UTC) Received: from sysam.it ([127.0.0.1]) by localhost (sysam.it [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VoG42zThyu2v; Fri, 14 Sep 2018 19:13:51 +0000 (UTC) Received: from localhost.localdomain (host238-237-dynamic.44-79-r.retail.telecomitalia.it [79.44.237.238]) by sysam.it (Postfix) with ESMTPSA id 50EA821E08; Fri, 14 Sep 2018 19:13:51 +0000 (UTC) From: Angelo Dureghello To: vinod.koul@linaro.org Cc: dmaengine@vger.kernel.org, sfr@canb.auug.org.au, Angelo Dureghello Subject: [PATCH -next v3] dmaengine: mcf-edma: avoid warning for wrong pointer cast Date: Fri, 14 Sep 2018 21:13:48 +0200 Message-Id: <20180914191348.4867-1-angelo@sysam.it> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes the following compilation warning reported during x86_64 allmodconfig build: drivers/dma/mcf-edma.c: In function 'mcf_edma_filter_fn': drivers/dma/mcf-edma.c:296:33: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] return (mcf_chan->slave_id == (u32)param); Reported-By: Stephen Rothwell Signed-off-by: Angelo Dureghello --- Changes for v2: - added Reported-By Changes for v3: - added more details about the patch - changed channel request cast using uintptr_t --- drivers/dma/mcf-edma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/mcf-edma.c b/drivers/dma/mcf-edma.c index 4d30d5302649..5de1b07eddff 100644 --- a/drivers/dma/mcf-edma.c +++ b/drivers/dma/mcf-edma.c @@ -293,7 +293,7 @@ bool mcf_edma_filter_fn(struct dma_chan *chan, void *param) if (chan->device->dev->driver == &mcf_edma_driver.driver) { struct fsl_edma_chan *mcf_chan = to_fsl_edma_chan(chan); - return (mcf_chan->slave_id == (u32)param); + return (mcf_chan->slave_id == (uintptr_t)param); } return false;