[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1435104444.2504.28.camel@perches.com>
Date: Tue, 23 Jun 2015 17:07:24 -0700
From: Joe Perches <joe@...ches.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
Cc: ulf.hansson@...aro.org, Nicholas Krause <xerofoify@...il.com>,
ben.dooks@...ethink.co.uk, ykaneko0929@...il.com,
laurent.pinchart+renesas@...asonboard.com,
kouichi.tomita.yn@...esas.com, linux-mmc@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCHv2] mmc:Add pointer cast to uintptr_t for slave_id_rx and
tx in the function, sh_mmcif_request_dma_one
On Wed, 2015-06-24 at 08:54 +0900, Kuninori Morimoto wrote:
> Can you please teach us about status of this patch ?
> > This adds a cast to the variables,slave_id_rx and slave_id_rx
> > to uintptr_t before casting to void* in order to avoid build
> > warning on 64bit platforms for the function, sh_mmcif_request_dma_one.
[]
> > diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
[]
> > @@ -398,8 +398,8 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
> >
> > if (pdata)
> > slave_data = direction == DMA_MEM_TO_DEV ?
> > - (void *)pdata->slave_id_tx :
> > - (void *)pdata->slave_id_rx;
> > + (void *)(uintptr_t)pdata->slave_id_tx :
> > + (void *)(uintptr_t)pdata->slave_id_rx;
It's far more common (~10:1) in the kernel to cast using
(<type> *)(unsigned long)<foo>
than
(<type> *)(uintptr_t)<foo>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists