dmaengine Archive on lore.kernel.org
 help / color / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: Vinod <vkoul@kernel.org>,
	dmaengine@vger.kernel.org,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCH 1/2] dmaengine: rcar-dmac: Use of_data values instead of a macro
Date: Tue, 27 Aug 2019 15:08:16 +0200
Message-ID: <CAMuHMdV9pSq1RrXG53=az1krVVnZF3M=F3MiS7t+Z5dMo_iKHg@mail.gmail.com> (raw)
In-Reply-To: <1566904231-25486-2-git-send-email-yoshihiro.shimoda.uh@renesas.com>

Hi Shimoda-san,

On Tue, Aug 27, 2019 at 1:12 PM Yoshihiro Shimoda
<yoshihiro.shimoda.uh@renesas.com> wrote:
> Since we will have changed memory mapping of the DMAC in the future,
> this patch uses of_data values instead of a macro to calculate
> each channel's base offset.
>
> Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

> --- a/drivers/dma/sh/rcar-dmac.c
> +++ b/drivers/dma/sh/rcar-dmac.c
> @@ -208,12 +208,20 @@ struct rcar_dmac {
>
>  #define to_rcar_dmac(d)                container_of(d, struct rcar_dmac, engine)
>
> +/*
> + * struct rcar_dmac_of_data - This driver's OF data
> + * @chan_offset_base: DMAC channels base offset
> + * @chan_offset_coefficient: DMAC channels offset coefficient

Perhaps "stride" instead of "coefficient"? Or "step"?

> @@ -1803,10 +1813,15 @@ static int rcar_dmac_probe(struct platform_device *pdev)
>         unsigned int channels_offset = 0;
>         struct dma_device *engine;
>         struct rcar_dmac *dmac;
> +       const struct rcar_dmac_of_data *data;
>         struct resource *mem;
>         unsigned int i;
>         int ret;
>
> +       data = of_device_get_match_data(&pdev->dev);
> +       if (!data)
> +               return -EINVAL;

This cannot fail, as the driver is DT only, and all entries in the match table
have a data pointer.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-27 11:10 [PATCH 0/2] dmaengine: rcar-dmac: minor modifications Yoshihiro Shimoda
2019-08-27 11:10 ` [PATCH 1/2] dmaengine: rcar-dmac: Use of_data values instead of a macro Yoshihiro Shimoda
2019-08-27 13:08   ` Geert Uytterhoeven [this message]
2019-08-31  8:36     ` Simon Horman
2019-08-27 11:10 ` [PATCH 2/2] dmaengine: rcar-dmac: Use devm_platform_ioremap_resource() Yoshihiro Shimoda
2019-08-27 13:10   ` Geert Uytterhoeven
2019-09-04  6:09 ` [PATCH 0/2] dmaengine: rcar-dmac: minor modifications Vinod Koul
2019-09-04  6:14   ` Yoshihiro Shimoda
2019-09-04  9:33     ` Vinod Koul

Reply instructions:

You may reply publically 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='CAMuHMdV9pSq1RrXG53=az1krVVnZF3M=F3MiS7t+Z5dMo_iKHg@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=vkoul@kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.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

dmaengine Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dmaengine/0 dmaengine/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dmaengine dmaengine/ https://lore.kernel.org/dmaengine \
		dmaengine@vger.kernel.org
	public-inbox-index dmaengine

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.dmaengine


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git