public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Nicholas Krause <xerofoify@gmail.com>
Cc: ulf.hansson@linaro.org, ben.dooks@codethink.co.uk,
	ykaneko0929@gmail.com, laurent.pinchart+renesas@ideasonboard.com,
	kouichi.tomita.yn@renesas.com, kuninori.morimoto.gx@renesas.com,
	linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mmc:Add pointer cast to long for slave_id_rx and tx in the function, sh_mmcif_request_dma_one
Date: Mon, 11 May 2015 20:28:24 +0300	[thread overview]
Message-ID: <1694173.4OOsIkYGBD@avalon> (raw)
In-Reply-To: <1431364517-26967-1-git-send-email-xerofoify@gmail.com>

Hello,

On Monday 11 May 2015 13:15:17 Nicholas Krause wrote:
> This adds a pointer cast to long in the function, sh_mmif_request_dma_one

I would use the uintptr_t type instead of long, as it has been designed for 
this purpose exactly.

> for the when assigning one of the variables slave_id_tx or slave_id_rx of
> the structure pointer,pdata to the void pointer, slave_data and the enum
> directon respectfully.

It's very nice to be respectful, but the commit message doesn't tell why this 
is needed. Something along the lines of "Cast integer to void * through 
uintptr_t to avoid compiler warning when compiling on 64bit platforms." would 
be more helpful.

> Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
> ---
>  drivers/mmc/host/sh_mmcif.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
> index 7eff087..e276558 100644
> --- 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 *)(long)pdata->slave_id_tx :
> +			(void *)(long)pdata->slave_id_rx;
> 
>  	chan = dma_request_slave_channel_compat(mask, shdma_chan_filter,
>  				slave_data, &host->pd->dev,

-- 
Regards,

Laurent Pinchart


           reply	other threads:[~2015-05-11 17:28 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1431364517-26967-1-git-send-email-xerofoify@gmail.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1694173.4OOsIkYGBD@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=ben.dooks@codethink.co.uk \
    --cc=kouichi.tomita.yn@renesas.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=xerofoify@gmail.com \
    --cc=ykaneko0929@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox