linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Wolfram Sang <wsa@the-dreams.de>, linux-i2c@vger.kernel.org
Cc: linux-sh@vger.kernel.org, Magnus Damm <magnus.damm@gmail.com>,
	Simon Horman <horms@verge.net.au>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [RFC 1/2] i2c: sh_mobile: refactor DMA setup
Date: Wed, 10 Dec 2014 22:06:34 +0300	[thread overview]
Message-ID: <548899BA.40002@cogentembedded.com> (raw)
In-Reply-To: <1418217709-26392-2-git-send-email-wsa@the-dreams.de>

Hello.

On 12/10/2014 04:21 PM, Wolfram Sang wrote:

> From: Wolfram Sang <wsa+renesas@sang-engineering.com>

> Refactor DMA setup to keep the errno so we can implement better
> deferred probe support in the next step.

> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>   drivers/i2c/busses/i2c-sh_mobile.c | 35 ++++++++++++++++-------------------
>   1 file changed, 16 insertions(+), 19 deletions(-)

> diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
> index b9c8cf2aac2c..636f2297143a 100644
> --- a/drivers/i2c/busses/i2c-sh_mobile.c
> +++ b/drivers/i2c/busses/i2c-sh_mobile.c
[...]
> @@ -749,21 +749,18 @@ static const struct of_device_id sh_mobile_i2c_dt_ids[] = {
>   };
>   MODULE_DEVICE_TABLE(of, sh_mobile_i2c_dt_ids);
>
> -static int sh_mobile_i2c_request_dma_chan(struct device *dev, enum dma_transfer_direction dir,
> -					  dma_addr_t port_addr, struct dma_chan **chan_ptr)
> +static struct dma_chan *sh_mobile_i2c_request_dma_chan(struct device *dev,
> +				enum dma_transfer_direction dir, dma_addr_t port_addr)

    Hm, alignment style changed...

[...]
> @@ -891,13 +886,15 @@ static int sh_mobile_i2c_probe(struct platform_device *dev)
>   	/* Init DMA */
>   	sg_init_table(&pd->sg, 1);
>   	pd->dma_direction = DMA_NONE;
> -	ret = sh_mobile_i2c_request_dma_chan(pd->dev, DMA_DEV_TO_MEM,
> -					     res->start + ICDR, &pd->dma_rx);
> +	pd->dma_rx = sh_mobile_i2c_request_dma_chan(pd->dev, DMA_DEV_TO_MEM,
> +					     res->start + ICDR);

    The alignment of this line is strange: it's neither here nor there, i.e. 
not aligned to the next char after ( above and still contains spaces. I think 
we want the old way of the alignment kept, i.e. the line starting under 
'pd->dev'...

> +	ret = PTR_ERR(pd->dma_rx);
>   	if (ret == -EPROBE_DEFER)
>   		return ret;
>
> -	ret = sh_mobile_i2c_request_dma_chan(pd->dev, DMA_MEM_TO_DEV,
> -					     res->start + ICDR, &pd->dma_tx);
> +	pd->dma_tx = sh_mobile_i2c_request_dma_chan(pd->dev, DMA_MEM_TO_DEV,
> +					     res->start + ICDR);

    Likewise.

[...]

WBR, Sergei


  reply	other threads:[~2014-12-10 19:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-10 13:21 [RFC 0/2] i2c: sh_mobile: don't regress on deferred probing Wolfram Sang
     [not found] ` <1418217709-26392-1-git-send-email-wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>
2014-12-10 13:21   ` [RFC 1/2] i2c: sh_mobile: refactor DMA setup Wolfram Sang
2014-12-10 19:06     ` Sergei Shtylyov [this message]
2014-12-16 11:34       ` Wolfram Sang
2014-12-16 21:06         ` Sergei Shtylyov
2014-12-10 13:49   ` [RFC 0/2] i2c: sh_mobile: don't regress on deferred probing Geert Uytterhoeven
2014-12-10 14:19     ` Wolfram Sang
2014-12-10 13:21 ` [RFC 2/2] i2c: sh_mobile: rework " Wolfram Sang
2014-12-10 13:44   ` Geert Uytterhoeven
2014-12-16 11:35     ` Wolfram Sang

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=548899BA.40002@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=geert@linux-m68k.org \
    --cc=horms@verge.net.au \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=wsa@the-dreams.de \
    /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;
as well as URLs for NNTP newsgroup(s).