From patchwork Tue Aug 11 12:48:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 6992191 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 18507C05AC for ; Tue, 11 Aug 2015 12:48:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4A2D9205C7 for ; Tue, 11 Aug 2015 12:48:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5429420522 for ; Tue, 11 Aug 2015 12:48:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964926AbbHKMsj (ORCPT ); Tue, 11 Aug 2015 08:48:39 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:40277 "EHLO andre.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964918AbbHKMsh (ORCPT ); Tue, 11 Aug 2015 08:48:37 -0400 Received: from ayla.of.borg ([84.193.93.87]) by andre.telenet-ops.be with bizsmtp id 3Qoc1r0011t5w8s01QocT1; Tue, 11 Aug 2015 14:48:36 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1ZP8yp-00068h-RS; Tue, 11 Aug 2015 14:48:35 +0200 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1ZP8yq-0007aH-Au; Tue, 11 Aug 2015 14:48:36 +0200 From: Geert Uytterhoeven To: Ulf Hansson , Kuninori Morimoto Cc: linux-mmc@vger.kernel.org, linux-sh@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH] mmc: sh_mmcif: Silence DMA slave ID compile warnings on 64-bit Date: Tue, 11 Aug 2015 14:48:34 +0200 Message-Id: <1439297314-29118-1-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On arm64: drivers/mmc/host/sh_mmcif.c: In function 'sh_mmcif_request_dma_one': drivers/mmc/host/sh_mmcif.c:417:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (void *)pdata->slave_id_tx : ^ drivers/mmc/host/sh_mmcif.c:418:4: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] (void *)pdata->slave_id_rx; ^ Add an intermediate cast to "uintptr_t" to kill the compile warning. While we're at it, replace "void *slave_data" by "unsigned int slave_id" to avoid having to cast in two places, and because it's a DMA slave ID, not a platform data pointer. Signed-off-by: Geert Uytterhoeven --- drivers/mmc/host/sh_mmcif.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c index 5a1fdd405b1af14f..51ac09b8a5770df2 100644 --- a/drivers/mmc/host/sh_mmcif.c +++ b/drivers/mmc/host/sh_mmcif.c @@ -403,7 +403,7 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host, { struct dma_slave_config cfg = { 0, }; struct dma_chan *chan; - void *slave_data = NULL; + unsigned int slave_id = 0; struct resource *res; struct device *dev = sh_mmcif_host_to_dev(host); dma_cap_mask_t mask; @@ -413,12 +413,11 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host, dma_cap_set(DMA_SLAVE, mask); if (pdata) - slave_data = direction == DMA_MEM_TO_DEV ? - (void *)pdata->slave_id_tx : - (void *)pdata->slave_id_rx; + slave_id = direction == DMA_MEM_TO_DEV ? + pdata->slave_id_tx : pdata->slave_id_rx; chan = dma_request_slave_channel_compat(mask, shdma_chan_filter, - slave_data, dev, + (void *)(uintptr_t)slave_id, dev, direction == DMA_MEM_TO_DEV ? "tx" : "rx"); dev_dbg(dev, "%s: %s: got channel %p\n", __func__,