diff mbox

memory: omap-gpmc: add error message if bank-width property is absent

Message ID 20170525200713.16694-1-u.kleine-koenig@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Uwe Kleine-König May 25, 2017, 8:07 p.m. UTC
Instead of failing silently log a hint for the dt author about the
reason of the failure.

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
---
 drivers/memory/omap-gpmc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Roger Quadros May 30, 2017, 7:32 a.m. UTC | #1
On 25/05/17 23:07, Uwe Kleine-König wrote:
> Instead of failing silently log a hint for the dt author about the
> reason of the failure.
> 
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>

Acked-by: Roger Quadros <rogerq@ti.com>

> ---
>  drivers/memory/omap-gpmc.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
> index 44b79db20021..2a46e6fd7d47 100644
> --- a/drivers/memory/omap-gpmc.c
> +++ b/drivers/memory/omap-gpmc.c
> @@ -2083,8 +2083,11 @@ static int gpmc_probe_generic_child(struct platform_device *pdev,
>  	} else {
>  		ret = of_property_read_u32(child, "bank-width",
>  					   &gpmc_s.device_width);
> -		if (ret < 0)
> +		if (ret < 0) {
> +			dev_err(&pdev->dev, "%s has no 'bank-width' property\n",
> +				child->full_name);
>  			goto err;
> +		}
>  	}
>  
>  	/* Reserve wait pin if it is required and valid */
>
Uwe Kleine-König May 30, 2017, 7:36 a.m. UTC | #2
Hello,

On Thu, May 25, 2017 at 10:07:13PM +0200, Uwe Kleine-König wrote:
> Instead of failing silently log a hint for the dt author about the
> reason of the failure.
> 
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>

If you take the patch, can you please do
s/uwe@kleine-koenig.org/u.kleine-koenig@pengutronix.de/ in the S-o-B
line? It seems I created the commit before setting up the author email
properly in my repository.

Thanks
Uwe
Roger Quadros May 30, 2017, 7:52 a.m. UTC | #3
On 30/05/17 10:36, Uwe Kleine-König wrote:
> Hello,
> 
> On Thu, May 25, 2017 at 10:07:13PM +0200, Uwe Kleine-König wrote:
>> Instead of failing silently log a hint for the dt author about the
>> reason of the failure.
>>
>> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> 
> If you take the patch, can you please do
> s/uwe@kleine-koenig.org/u.kleine-koenig@pengutronix.de/ in the S-o-B
> line? It seems I created the commit before setting up the author email
> properly in my repository.

OK. This should be done for the previous patch as well right?
https://patchwork.kernel.org/patch/9731795/
Uwe Kleine-König May 30, 2017, 7:57 a.m. UTC | #4
Hello,

On Tue, May 30, 2017 at 10:52:12AM +0300, Roger Quadros wrote:
> On 30/05/17 10:36, Uwe Kleine-König wrote:
> > On Thu, May 25, 2017 at 10:07:13PM +0200, Uwe Kleine-König wrote:
> >> Instead of failing silently log a hint for the dt author about the
> >> reason of the failure.
> >>
> >> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> > 
> > If you take the patch, can you please do
> > s/uwe@kleine-koenig.org/u.kleine-koenig@pengutronix.de/ in the S-o-B
> > line? It seems I created the commit before setting up the author email
> > properly in my repository.
> 
> OK. This should be done for the previous patch as well right?
> https://patchwork.kernel.org/patch/9731795/

Right, thanks for your attention.

Uwe
Tony Lindgren May 31, 2017, 5:11 p.m. UTC | #5
* Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [170530 01:01]:
> Hello,
> 
> On Tue, May 30, 2017 at 10:52:12AM +0300, Roger Quadros wrote:
> > On 30/05/17 10:36, Uwe Kleine-König wrote:
> > > On Thu, May 25, 2017 at 10:07:13PM +0200, Uwe Kleine-König wrote:
> > >> Instead of failing silently log a hint for the dt author about the
> > >> reason of the failure.
> > >>
> > >> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> > > 
> > > If you take the patch, can you please do
> > > s/uwe@kleine-koenig.org/u.kleine-koenig@pengutronix.de/ in the S-o-B
> > > line? It seems I created the commit before setting up the author email
> > > properly in my repository.
> > 
> > OK. This should be done for the previous patch as well right?
> > https://patchwork.kernel.org/patch/9731795/
> 
> Right, thanks for your attention.

OK applying both into omap-for-v4.13/gpmc with Roger's ack
and Uwe's email address corrected.

Thanks,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index 44b79db20021..2a46e6fd7d47 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -2083,8 +2083,11 @@  static int gpmc_probe_generic_child(struct platform_device *pdev,
 	} else {
 		ret = of_property_read_u32(child, "bank-width",
 					   &gpmc_s.device_width);
-		if (ret < 0)
+		if (ret < 0) {
+			dev_err(&pdev->dev, "%s has no 'bank-width' property\n",
+				child->full_name);
 			goto err;
+		}
 	}
 
 	/* Reserve wait pin if it is required and valid */