lkml.org 
[lkml]   [2015]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCHv2] mmc:Add pointer cast to uintptr_t for slave_id_rx and tx in the function, sh_mmcif_request_dma_one
From
Date
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>



\
 
 \ /
  Last update: 2015-06-24 02:21    [W:0.055 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site