From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Pinchart Date: Thu, 15 Jan 2015 23:30:21 +0000 Subject: Re: [PATCH] dmaengine: of: bail out early if "dmas" property is not present Message-Id: <2985582.KWahZ5isJS@avalon> List-Id: References: <1421244988-11794-1-git-send-email-wsa@the-dreams.de> In-Reply-To: <1421244988-11794-1-git-send-email-wsa@the-dreams.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Wolfram Sang Cc: dmaengine@vger.kernel.org, linux-sh@vger.kernel.org, Magnus Damm , Simon Horman , Geert Uytterhoeven , Philipp Zabel , Vinod Koul , linux-kernel@vger.kernel.org Hi Wolfram, Thank you for the patch. On Wednesday 14 January 2015 15:16:28 Wolfram Sang wrote: > From: Wolfram Sang > > And don't print an error: not configured is not an error. > > Reported-by: Philipp Zabel > Signed-off-by: Wolfram Sang This looks good to me. Acked-by: Laurent Pinchart > --- > > 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