LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Wolfram Sang <wsa@the-dreams.de>
Cc: dmaengine@vger.kernel.org, linux-sh@vger.kernel.org,
	Magnus Damm <magnus.damm@gmail.com>,
	Simon Horman <horms@verge.net.au>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Vinod Koul <vinod.koul@intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dmaengine: of: bail out early if "dmas" property is not present
Date: Fri, 16 Jan 2015 01:30:21 +0200	[thread overview]
Message-ID: <2985582.KWahZ5isJS@avalon> (raw)
In-Reply-To: <1421244988-11794-1-git-send-email-wsa@the-dreams.de>

Hi Wolfram,

Thank you for the patch.

On Wednesday 14 January 2015 15:16:28 Wolfram Sang wrote:
> From: Wolfram Sang <wsa+renesas@sang-engineering.com>
> 
> And don't print an error: not configured is not an error.
> 
> Reported-by: Philipp Zabel <p.zabel@pengutronix.de>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

This looks good to me.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
> 
> In response to Philipp's patch silencing the warning in the driver:
> http://patchwork.ozlabs.org/patch/425696/
> 
> I think this should be handled in the core.
> 
>  drivers/dma/of-dma.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c
> index d5fbeaa1e7ba..ca31f1b45366 100644
> --- a/drivers/dma/of-dma.c
> +++ b/drivers/dma/of-dma.c
> @@ -159,6 +159,10 @@ struct dma_chan *of_dma_request_slave_channel(struct
> device_node *np, return ERR_PTR(-ENODEV);
>  	}
> 
> +	/* Silently fail if there is not even the "dmas" property */
> +	if (!of_find_property(np, "dmas", NULL))
> +		return ERR_PTR(-ENODEV);
> +
>  	count = of_property_count_strings(np, "dma-names");
>  	if (count < 0) {
>  		pr_err("%s: dma-names property of node '%s' missing or empty\n",

-- 
Regards,

Laurent Pinchart


  parent reply	other threads:[~2015-01-15 23:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-14 14:16 Wolfram Sang
2015-01-14 14:20 ` Geert Uytterhoeven
2015-01-15 23:30 ` Laurent Pinchart [this message]
2015-01-22 14:48 ` Philipp Zabel
2015-01-26  6:45 ` Vinod Koul

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=2985582.KWahZ5isJS@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=horms@verge.net.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=p.zabel@pengutronix.de \
    --cc=vinod.koul@intel.com \
    --cc=wsa@the-dreams.de \
    --subject='Re: [PATCH] dmaengine: of: bail out early if "dmas" property is not present' \
    /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

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).