* [PATCH v3 0/5] drivers: bus: omap_l3: Conversion to devm_*
@ 2014-03-04 12:48 Peter Ujfalusi
2014-03-04 12:48 ` [PATCH v3 1/5] drivers: bus: omap_l3: Convert to use devm_kzalloc Peter Ujfalusi
` (4 more replies)
0 siblings, 5 replies; 11+ messages in thread
From: Peter Ujfalusi @ 2014-03-04 12:48 UTC (permalink / raw)
To: Santosh Shilimkar, Tony Lindgren
Cc: Olof Johansson, linux-omap, linux-kernel, Arnd Bergmann,
linux-arm-kernel
Hi,
Changes since v2:
Comments from Alexander Shiyan addressed:
- Do not check the return of platform_get_resource() - no need to do that
- Use devm_ioremap_resource() instead devm_request_and_ioremap()
Changes since v1:
- Fixed Santosh's email address in the commit messages.
Cleanup of platform probe and remove (removing the remove function at the end)
with converting the driver to use the devm_* versions kzalloc, ioremap and
request_irq.
This is a resend of an old series which I found when doing some spring cleanup
on my HDD:
http://www.spinics.net/lists/linux-omap/msg90531.html
Regards,
Peter
---
Peter Ujfalusi (5):
drivers: bus: omap_l3: Convert to use devm_kzalloc
drivers: bus: omap_l3: Convert to use devm_ioremap_resource()
drivers: bus: omap_l3: Convert to use devm_request_irq()
drivers: bus: omap_l3: Remove the platform driver's remove function
drivers: bus: omap_l3: Change pr_crit() to dev_err() when IRQ request
fails
drivers/bus/omap_l3_noc.c | 102 +++++++++-------------------------------------
1 file changed, 20 insertions(+), 82 deletions(-)
--
1.9.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 1/5] drivers: bus: omap_l3: Convert to use devm_kzalloc
2014-03-04 12:48 [PATCH v3 0/5] drivers: bus: omap_l3: Conversion to devm_* Peter Ujfalusi
@ 2014-03-04 12:48 ` Peter Ujfalusi
2014-03-04 12:48 ` [PATCH v3 2/5] drivers: bus: omap_l3: Convert to use devm_ioremap_resource() Peter Ujfalusi
` (3 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Peter Ujfalusi @ 2014-03-04 12:48 UTC (permalink / raw)
To: Santosh Shilimkar, Tony Lindgren
Cc: Olof Johansson, Arnd Bergmann, linux-kernel, linux-omap,
linux-arm-kernel
We can remove the kfree() calls from probe and remove.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
drivers/bus/omap_l3_noc.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c
index feeecae623f6..d25d727e7cfb 100644
--- a/drivers/bus/omap_l3_noc.c
+++ b/drivers/bus/omap_l3_noc.c
@@ -134,7 +134,7 @@ static int omap4_l3_probe(struct platform_device *pdev)
struct resource *res;
int ret;
- l3 = kzalloc(sizeof(*l3), GFP_KERNEL);
+ l3 = devm_kzalloc(&pdev->dev, sizeof(*l3), GFP_KERNEL);
if (!l3)
return -ENOMEM;
@@ -142,15 +142,13 @@ static int omap4_l3_probe(struct platform_device *pdev)
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res) {
dev_err(&pdev->dev, "couldn't find resource 0\n");
- ret = -ENODEV;
- goto err0;
+ return -ENODEV;
}
l3->l3_base[0] = ioremap(res->start, resource_size(res));
if (!l3->l3_base[0]) {
dev_err(&pdev->dev, "ioremap failed\n");
- ret = -ENOMEM;
- goto err0;
+ return -ENOMEM;
}
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
@@ -214,8 +212,6 @@ err2:
iounmap(l3->l3_base[1]);
err1:
iounmap(l3->l3_base[0]);
-err0:
- kfree(l3);
return ret;
}
@@ -228,7 +224,6 @@ static int omap4_l3_remove(struct platform_device *pdev)
iounmap(l3->l3_base[0]);
iounmap(l3->l3_base[1]);
iounmap(l3->l3_base[2]);
- kfree(l3);
return 0;
}
--
1.9.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v3 2/5] drivers: bus: omap_l3: Convert to use devm_ioremap_resource()
2014-03-04 12:48 [PATCH v3 0/5] drivers: bus: omap_l3: Conversion to devm_* Peter Ujfalusi
2014-03-04 12:48 ` [PATCH v3 1/5] drivers: bus: omap_l3: Convert to use devm_kzalloc Peter Ujfalusi
@ 2014-03-04 12:48 ` Peter Ujfalusi
2014-03-04 12:48 ` [PATCH v3 3/5] drivers: bus: omap_l3: Convert to use devm_request_irq() Peter Ujfalusi
` (2 subsequent siblings)
4 siblings, 0 replies; 11+ messages in thread
From: Peter Ujfalusi @ 2014-03-04 12:48 UTC (permalink / raw)
To: Santosh Shilimkar, Tony Lindgren
Cc: Olof Johansson, Arnd Bergmann, linux-kernel, linux-omap,
linux-arm-kernel
We can then remove the iounmap() calls from probe and remove.
Since the driver requests the resources via index we can do the mem resource
request within a for loop.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
drivers/bus/omap_l3_noc.c | 59 +++++++++--------------------------------------
1 file changed, 11 insertions(+), 48 deletions(-)
diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c
index d25d727e7cfb..6f58be3c2f76 100644
--- a/drivers/bus/omap_l3_noc.c
+++ b/drivers/bus/omap_l3_noc.c
@@ -131,52 +131,24 @@ static irqreturn_t l3_interrupt_handler(int irq, void *_l3)
static int omap4_l3_probe(struct platform_device *pdev)
{
static struct omap4_l3 *l3;
- struct resource *res;
- int ret;
+ int ret, i;
l3 = devm_kzalloc(&pdev->dev, sizeof(*l3), GFP_KERNEL);
if (!l3)
return -ENOMEM;
platform_set_drvdata(pdev, l3);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(&pdev->dev, "couldn't find resource 0\n");
- return -ENODEV;
- }
-
- l3->l3_base[0] = ioremap(res->start, resource_size(res));
- if (!l3->l3_base[0]) {
- dev_err(&pdev->dev, "ioremap failed\n");
- return -ENOMEM;
- }
-
- res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- if (!res) {
- dev_err(&pdev->dev, "couldn't find resource 1\n");
- ret = -ENODEV;
- goto err1;
- }
- l3->l3_base[1] = ioremap(res->start, resource_size(res));
- if (!l3->l3_base[1]) {
- dev_err(&pdev->dev, "ioremap failed\n");
- ret = -ENOMEM;
- goto err1;
- }
-
- res = platform_get_resource(pdev, IORESOURCE_MEM, 2);
- if (!res) {
- dev_err(&pdev->dev, "couldn't find resource 2\n");
- ret = -ENODEV;
- goto err2;
- }
+ /* Get mem resources */
+ for (i = 0; i < L3_MODULES; i++) {
+ struct resource *res = platform_get_resource(pdev,
+ IORESOURCE_MEM, i);
- l3->l3_base[2] = ioremap(res->start, resource_size(res));
- if (!l3->l3_base[2]) {
- dev_err(&pdev->dev, "ioremap failed\n");
- ret = -ENOMEM;
- goto err2;
+ l3->l3_base[i] = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(l3->l3_base[i])) {
+ dev_err(&pdev->dev, "ioremap %d failed\n", i);
+ return PTR_ERR(l3->l3_base[i]);
+ }
}
/*
@@ -189,7 +161,7 @@ static int omap4_l3_probe(struct platform_device *pdev)
if (ret) {
pr_crit("L3: request_irq failed to register for 0x%x\n",
l3->debug_irq);
- goto err3;
+ return ret;
}
l3->app_irq = platform_get_irq(pdev, 1);
@@ -206,12 +178,6 @@ static int omap4_l3_probe(struct platform_device *pdev)
err4:
free_irq(l3->debug_irq, l3);
-err3:
- iounmap(l3->l3_base[2]);
-err2:
- iounmap(l3->l3_base[1]);
-err1:
- iounmap(l3->l3_base[0]);
return ret;
}
@@ -221,9 +187,6 @@ static int omap4_l3_remove(struct platform_device *pdev)
free_irq(l3->app_irq, l3);
free_irq(l3->debug_irq, l3);
- iounmap(l3->l3_base[0]);
- iounmap(l3->l3_base[1]);
- iounmap(l3->l3_base[2]);
return 0;
}
--
1.9.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v3 3/5] drivers: bus: omap_l3: Convert to use devm_request_irq()
2014-03-04 12:48 [PATCH v3 0/5] drivers: bus: omap_l3: Conversion to devm_* Peter Ujfalusi
2014-03-04 12:48 ` [PATCH v3 1/5] drivers: bus: omap_l3: Convert to use devm_kzalloc Peter Ujfalusi
2014-03-04 12:48 ` [PATCH v3 2/5] drivers: bus: omap_l3: Convert to use devm_ioremap_resource() Peter Ujfalusi
@ 2014-03-04 12:48 ` Peter Ujfalusi
2014-03-04 12:48 ` [PATCH v3 4/5] drivers: bus: omap_l3: Remove the platform driver's remove function Peter Ujfalusi
2014-03-04 12:48 ` [PATCH v3 5/5] drivers: bus: omap_l3: Change pr_crit() to dev_err() when IRQ request fails Peter Ujfalusi
4 siblings, 0 replies; 11+ messages in thread
From: Peter Ujfalusi @ 2014-03-04 12:48 UTC (permalink / raw)
To: Santosh Shilimkar, Tony Lindgren
Cc: Olof Johansson, Arnd Bergmann, linux-kernel, linux-omap,
linux-arm-kernel
With this we can remove the free_irq() calls from probe and remove.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
drivers/bus/omap_l3_noc.c | 23 +++++------------------
1 file changed, 5 insertions(+), 18 deletions(-)
diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c
index 6f58be3c2f76..25bcb60be880 100644
--- a/drivers/bus/omap_l3_noc.c
+++ b/drivers/bus/omap_l3_noc.c
@@ -155,9 +155,8 @@ static int omap4_l3_probe(struct platform_device *pdev)
* Setup interrupt Handlers
*/
l3->debug_irq = platform_get_irq(pdev, 0);
- ret = request_irq(l3->debug_irq,
- l3_interrupt_handler,
- IRQF_DISABLED, "l3-dbg-irq", l3);
+ ret = devm_request_irq(&pdev->dev, l3->debug_irq, l3_interrupt_handler,
+ IRQF_DISABLED, "l3-dbg-irq", l3);
if (ret) {
pr_crit("L3: request_irq failed to register for 0x%x\n",
l3->debug_irq);
@@ -165,29 +164,17 @@ static int omap4_l3_probe(struct platform_device *pdev)
}
l3->app_irq = platform_get_irq(pdev, 1);
- ret = request_irq(l3->app_irq,
- l3_interrupt_handler,
- IRQF_DISABLED, "l3-app-irq", l3);
- if (ret) {
+ ret = devm_request_irq(&pdev->dev, l3->app_irq, l3_interrupt_handler,
+ IRQF_DISABLED, "l3-app-irq", l3);
+ if (ret)
pr_crit("L3: request_irq failed to register for 0x%x\n",
l3->app_irq);
- goto err4;
- }
-
- return 0;
-err4:
- free_irq(l3->debug_irq, l3);
return ret;
}
static int omap4_l3_remove(struct platform_device *pdev)
{
- struct omap4_l3 *l3 = platform_get_drvdata(pdev);
-
- free_irq(l3->app_irq, l3);
- free_irq(l3->debug_irq, l3);
-
return 0;
}
--
1.9.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v3 4/5] drivers: bus: omap_l3: Remove the platform driver's remove function
2014-03-04 12:48 [PATCH v3 0/5] drivers: bus: omap_l3: Conversion to devm_* Peter Ujfalusi
` (2 preceding siblings ...)
2014-03-04 12:48 ` [PATCH v3 3/5] drivers: bus: omap_l3: Convert to use devm_request_irq() Peter Ujfalusi
@ 2014-03-04 12:48 ` Peter Ujfalusi
2014-03-04 12:48 ` [PATCH v3 5/5] drivers: bus: omap_l3: Change pr_crit() to dev_err() when IRQ request fails Peter Ujfalusi
4 siblings, 0 replies; 11+ messages in thread
From: Peter Ujfalusi @ 2014-03-04 12:48 UTC (permalink / raw)
To: Santosh Shilimkar, Tony Lindgren
Cc: Olof Johansson, Arnd Bergmann, linux-kernel, linux-omap,
linux-arm-kernel
It is NOP after the devm_* conversion.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
drivers/bus/omap_l3_noc.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c
index 25bcb60be880..0eff48585ae3 100644
--- a/drivers/bus/omap_l3_noc.c
+++ b/drivers/bus/omap_l3_noc.c
@@ -173,11 +173,6 @@ static int omap4_l3_probe(struct platform_device *pdev)
return ret;
}
-static int omap4_l3_remove(struct platform_device *pdev)
-{
- return 0;
-}
-
#if defined(CONFIG_OF)
static const struct of_device_id l3_noc_match[] = {
{.compatible = "ti,omap4-l3-noc", },
@@ -190,7 +185,6 @@ MODULE_DEVICE_TABLE(of, l3_noc_match);
static struct platform_driver omap4_l3_driver = {
.probe = omap4_l3_probe,
- .remove = omap4_l3_remove,
.driver = {
.name = "omap_l3_noc",
.owner = THIS_MODULE,
--
1.9.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v3 5/5] drivers: bus: omap_l3: Change pr_crit() to dev_err() when IRQ request fails
2014-03-04 12:48 [PATCH v3 0/5] drivers: bus: omap_l3: Conversion to devm_* Peter Ujfalusi
` (3 preceding siblings ...)
2014-03-04 12:48 ` [PATCH v3 4/5] drivers: bus: omap_l3: Remove the platform driver's remove function Peter Ujfalusi
@ 2014-03-04 12:48 ` Peter Ujfalusi
2014-03-04 14:37 ` Santosh Shilimkar
4 siblings, 1 reply; 11+ messages in thread
From: Peter Ujfalusi @ 2014-03-04 12:48 UTC (permalink / raw)
To: Santosh Shilimkar, Tony Lindgren
Cc: Olof Johansson, Arnd Bergmann, linux-kernel, linux-omap,
linux-arm-kernel
Use dev_err() which will going to print the driver's name as well and the
KERN_ERR level is sufficient in this case (we also print via dev_err when
there is an error with the mem resources)
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
---
drivers/bus/omap_l3_noc.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c
index 0eff48585ae3..972691a668a3 100644
--- a/drivers/bus/omap_l3_noc.c
+++ b/drivers/bus/omap_l3_noc.c
@@ -158,8 +158,8 @@ static int omap4_l3_probe(struct platform_device *pdev)
ret = devm_request_irq(&pdev->dev, l3->debug_irq, l3_interrupt_handler,
IRQF_DISABLED, "l3-dbg-irq", l3);
if (ret) {
- pr_crit("L3: request_irq failed to register for 0x%x\n",
- l3->debug_irq);
+ dev_err(&pdev->dev, "request_irq failed for %d\n",
+ l3->debug_irq);
return ret;
}
@@ -167,8 +167,7 @@ static int omap4_l3_probe(struct platform_device *pdev)
ret = devm_request_irq(&pdev->dev, l3->app_irq, l3_interrupt_handler,
IRQF_DISABLED, "l3-app-irq", l3);
if (ret)
- pr_crit("L3: request_irq failed to register for 0x%x\n",
- l3->app_irq);
+ dev_err(&pdev->dev, "request_irq failed for %d\n", l3->app_irq);
return ret;
}
--
1.9.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v3 5/5] drivers: bus: omap_l3: Change pr_crit() to dev_err() when IRQ request fails
2014-03-04 12:48 ` [PATCH v3 5/5] drivers: bus: omap_l3: Change pr_crit() to dev_err() when IRQ request fails Peter Ujfalusi
@ 2014-03-04 14:37 ` Santosh Shilimkar
2014-03-05 7:11 ` Peter Ujfalusi
0 siblings, 1 reply; 11+ messages in thread
From: Santosh Shilimkar @ 2014-03-04 14:37 UTC (permalink / raw)
To: Peter Ujfalusi, Tony Lindgren
Cc: Olof Johansson, linux-omap, linux-kernel, Arnd Bergmann,
linux-arm-kernel
On Tuesday 04 March 2014 08:48 PM, Peter Ujfalusi wrote:
> Use dev_err() which will going to print the driver's name as well and the
> KERN_ERR level is sufficient in this case (we also print via dev_err when
> there is an error with the mem resources)
>
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> ---
> drivers/bus/omap_l3_noc.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c
> index 0eff48585ae3..972691a668a3 100644
> --- a/drivers/bus/omap_l3_noc.c
> +++ b/drivers/bus/omap_l3_noc.c
> @@ -158,8 +158,8 @@ static int omap4_l3_probe(struct platform_device *pdev)
> ret = devm_request_irq(&pdev->dev, l3->debug_irq, l3_interrupt_handler,
> IRQF_DISABLED, "l3-dbg-irq", l3);
> if (ret) {
> - pr_crit("L3: request_irq failed to register for 0x%x\n",
> - l3->debug_irq);
> + dev_err(&pdev->dev, "request_irq failed for %d\n",
> + l3->debug_irq);
> return ret;
> }
>
> @@ -167,8 +167,7 @@ static int omap4_l3_probe(struct platform_device *pdev)
> ret = devm_request_irq(&pdev->dev, l3->app_irq, l3_interrupt_handler,
> IRQF_DISABLED, "l3-app-irq", l3);
> if (ret)
> - pr_crit("L3: request_irq failed to register for 0x%x\n",
> - l3->app_irq);
> + dev_err(&pdev->dev, "request_irq failed for %d\n", l3->app_irq);
>
> return ret;
> }
>
So this one change in the log level. If I look at now, may be dev_err
is fine but the change is not same.
Apart from above comment, rest of the series looks fine to me.
Feel free to add my ack...
Regards,
Santosh
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 5/5] drivers: bus: omap_l3: Change pr_crit() to dev_err() when IRQ request fails
2014-03-04 14:37 ` Santosh Shilimkar
@ 2014-03-05 7:11 ` Peter Ujfalusi
2014-03-12 17:28 ` Tony Lindgren
0 siblings, 1 reply; 11+ messages in thread
From: Peter Ujfalusi @ 2014-03-05 7:11 UTC (permalink / raw)
To: Santosh Shilimkar, Tony Lindgren
Cc: Olof Johansson, Arnd Bergmann, linux-kernel, linux-omap,
linux-arm-kernel
On 03/04/2014 04:37 PM, Santosh Shilimkar wrote:
> On Tuesday 04 March 2014 08:48 PM, Peter Ujfalusi wrote:
>> Use dev_err() which will going to print the driver's name as well and the
>> KERN_ERR level is sufficient in this case (we also print via dev_err when
>> there is an error with the mem resources)
>>
>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>> ---
>> drivers/bus/omap_l3_noc.c | 7 +++----
>> 1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c
>> index 0eff48585ae3..972691a668a3 100644
>> --- a/drivers/bus/omap_l3_noc.c
>> +++ b/drivers/bus/omap_l3_noc.c
>> @@ -158,8 +158,8 @@ static int omap4_l3_probe(struct platform_device *pdev)
>> ret = devm_request_irq(&pdev->dev, l3->debug_irq, l3_interrupt_handler,
>> IRQF_DISABLED, "l3-dbg-irq", l3);
>> if (ret) {
>> - pr_crit("L3: request_irq failed to register for 0x%x\n",
>> - l3->debug_irq);
>> + dev_err(&pdev->dev, "request_irq failed for %d\n",
>> + l3->debug_irq);
>> return ret;
>> }
>>
>> @@ -167,8 +167,7 @@ static int omap4_l3_probe(struct platform_device *pdev)
>> ret = devm_request_irq(&pdev->dev, l3->app_irq, l3_interrupt_handler,
>> IRQF_DISABLED, "l3-app-irq", l3);
>> if (ret)
>> - pr_crit("L3: request_irq failed to register for 0x%x\n",
>> - l3->app_irq);
>> + dev_err(&pdev->dev, "request_irq failed for %d\n", l3->app_irq);
>>
>> return ret;
>> }
>>
> So this one change in the log level. If I look at now, may be dev_err
> is fine but the change is not same.
Not sure what you mean by 'the change is not same'?
I just picked the old series and rebased it on linux-next, the patch is the
same as it was back in May 2013:
https://lkml.org/lkml/2013/5/2/205
And yes, I have shortened the texts in the print, but the meaning of the
prints have not changed.
> Apart from above comment, rest of the series looks fine to me.
> Feel free to add my ack...
Thanks.
--
Péter
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 5/5] drivers: bus: omap_l3: Change pr_crit() to dev_err() when IRQ request fails
2014-03-05 7:11 ` Peter Ujfalusi
@ 2014-03-12 17:28 ` Tony Lindgren
2014-03-12 21:05 ` Santosh Shilimkar
0 siblings, 1 reply; 11+ messages in thread
From: Tony Lindgren @ 2014-03-12 17:28 UTC (permalink / raw)
To: Peter Ujfalusi
Cc: Santosh Shilimkar, Olof Johansson, Arnd Bergmann, linux-kernel,
linux-omap, linux-arm-kernel
* Peter Ujfalusi <peter.ujfalusi@ti.com> [140304 23:14]:
> On 03/04/2014 04:37 PM, Santosh Shilimkar wrote:
> > On Tuesday 04 March 2014 08:48 PM, Peter Ujfalusi wrote:
> >> Use dev_err() which will going to print the driver's name as well and the
> >> KERN_ERR level is sufficient in this case (we also print via dev_err when
> >> there is an error with the mem resources)
> >>
> >> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> >> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> >> ---
> >> drivers/bus/omap_l3_noc.c | 7 +++----
> >> 1 file changed, 3 insertions(+), 4 deletions(-)
> >>
> >> diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c
> >> index 0eff48585ae3..972691a668a3 100644
> >> --- a/drivers/bus/omap_l3_noc.c
> >> +++ b/drivers/bus/omap_l3_noc.c
> >> @@ -158,8 +158,8 @@ static int omap4_l3_probe(struct platform_device *pdev)
> >> ret = devm_request_irq(&pdev->dev, l3->debug_irq, l3_interrupt_handler,
> >> IRQF_DISABLED, "l3-dbg-irq", l3);
> >> if (ret) {
> >> - pr_crit("L3: request_irq failed to register for 0x%x\n",
> >> - l3->debug_irq);
> >> + dev_err(&pdev->dev, "request_irq failed for %d\n",
> >> + l3->debug_irq);
> >> return ret;
> >> }
> >>
> >> @@ -167,8 +167,7 @@ static int omap4_l3_probe(struct platform_device *pdev)
> >> ret = devm_request_irq(&pdev->dev, l3->app_irq, l3_interrupt_handler,
> >> IRQF_DISABLED, "l3-app-irq", l3);
> >> if (ret)
> >> - pr_crit("L3: request_irq failed to register for 0x%x\n",
> >> - l3->app_irq);
> >> + dev_err(&pdev->dev, "request_irq failed for %d\n", l3->app_irq);
> >>
> >> return ret;
> >> }
> >>
> > So this one change in the log level. If I look at now, may be dev_err
> > is fine but the change is not same.
>
> Not sure what you mean by 'the change is not same'?
> I just picked the old series and rebased it on linux-next, the patch is the
> same as it was back in May 2013:
> https://lkml.org/lkml/2013/5/2/205
>
> And yes, I have shortened the texts in the print, but the meaning of the
> prints have not changed.
Santosh, got any more comments on this series?
Regards,
Tony
> > Apart from above comment, rest of the series looks fine to me.
> > Feel free to add my ack...
>
> Thanks.
>
> --
> Péter
--
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
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 5/5] drivers: bus: omap_l3: Change pr_crit() to dev_err() when IRQ request fails
2014-03-12 17:28 ` Tony Lindgren
@ 2014-03-12 21:05 ` Santosh Shilimkar
2014-03-12 21:11 ` Tony Lindgren
0 siblings, 1 reply; 11+ messages in thread
From: Santosh Shilimkar @ 2014-03-12 21:05 UTC (permalink / raw)
To: Tony Lindgren, Peter Ujfalusi
Cc: Olof Johansson, Arnd Bergmann, linux-kernel, linux-omap,
linux-arm-kernel
On Thursday 13 March 2014 01:28 AM, Tony Lindgren wrote:
> * Peter Ujfalusi <peter.ujfalusi@ti.com> [140304 23:14]:
>> On 03/04/2014 04:37 PM, Santosh Shilimkar wrote:
>>> On Tuesday 04 March 2014 08:48 PM, Peter Ujfalusi wrote:
>>>> Use dev_err() which will going to print the driver's name as well and the
>>>> KERN_ERR level is sufficient in this case (we also print via dev_err when
>>>> there is an error with the mem resources)
>>>>
>>>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>>>> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>>> ---
>>>> drivers/bus/omap_l3_noc.c | 7 +++----
>>>> 1 file changed, 3 insertions(+), 4 deletions(-)
>>>>
>>>> diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c
>>>> index 0eff48585ae3..972691a668a3 100644
>>>> --- a/drivers/bus/omap_l3_noc.c
>>>> +++ b/drivers/bus/omap_l3_noc.c
>>>> @@ -158,8 +158,8 @@ static int omap4_l3_probe(struct platform_device *pdev)
>>>> ret = devm_request_irq(&pdev->dev, l3->debug_irq, l3_interrupt_handler,
>>>> IRQF_DISABLED, "l3-dbg-irq", l3);
>>>> if (ret) {
>>>> - pr_crit("L3: request_irq failed to register for 0x%x\n",
>>>> - l3->debug_irq);
>>>> + dev_err(&pdev->dev, "request_irq failed for %d\n",
>>>> + l3->debug_irq);
>>>> return ret;
>>>> }
>>>>
>>>> @@ -167,8 +167,7 @@ static int omap4_l3_probe(struct platform_device *pdev)
>>>> ret = devm_request_irq(&pdev->dev, l3->app_irq, l3_interrupt_handler,
>>>> IRQF_DISABLED, "l3-app-irq", l3);
>>>> if (ret)
>>>> - pr_crit("L3: request_irq failed to register for 0x%x\n",
>>>> - l3->app_irq);
>>>> + dev_err(&pdev->dev, "request_irq failed for %d\n", l3->app_irq);
>>>>
>>>> return ret;
>>>> }
>>>>
>>> So this one change in the log level. If I look at now, may be dev_err
>>> is fine but the change is not same.
>>
>> Not sure what you mean by 'the change is not same'?
>> I just picked the old series and rebased it on linux-next, the patch is the
>> same as it was back in May 2013:
>> https://lkml.org/lkml/2013/5/2/205
>>
>> And yes, I have shortened the texts in the print, but the meaning of the
>> prints have not changed.
>
> Santosh, got any more comments on this series?
>
Nope. looks good
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 5/5] drivers: bus: omap_l3: Change pr_crit() to dev_err() when IRQ request fails
2014-03-12 21:05 ` Santosh Shilimkar
@ 2014-03-12 21:11 ` Tony Lindgren
0 siblings, 0 replies; 11+ messages in thread
From: Tony Lindgren @ 2014-03-12 21:11 UTC (permalink / raw)
To: Santosh Shilimkar
Cc: Peter Ujfalusi, Olof Johansson, Arnd Bergmann, linux-kernel,
linux-omap, linux-arm-kernel
* Santosh Shilimkar <santosh.shilimkar@ti.com> [140312 14:08]:
> On Thursday 13 March 2014 01:28 AM, Tony Lindgren wrote:
> > * Peter Ujfalusi <peter.ujfalusi@ti.com> [140304 23:14]:
> >> On 03/04/2014 04:37 PM, Santosh Shilimkar wrote:
> >>> On Tuesday 04 March 2014 08:48 PM, Peter Ujfalusi wrote:
> >>>> Use dev_err() which will going to print the driver's name as well and the
> >>>> KERN_ERR level is sufficient in this case (we also print via dev_err when
> >>>> there is an error with the mem resources)
> >>>>
> >>>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> >>>> Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
> >>>> ---
> >>>> drivers/bus/omap_l3_noc.c | 7 +++----
> >>>> 1 file changed, 3 insertions(+), 4 deletions(-)
> >>>>
> >>>> diff --git a/drivers/bus/omap_l3_noc.c b/drivers/bus/omap_l3_noc.c
> >>>> index 0eff48585ae3..972691a668a3 100644
> >>>> --- a/drivers/bus/omap_l3_noc.c
> >>>> +++ b/drivers/bus/omap_l3_noc.c
> >>>> @@ -158,8 +158,8 @@ static int omap4_l3_probe(struct platform_device *pdev)
> >>>> ret = devm_request_irq(&pdev->dev, l3->debug_irq, l3_interrupt_handler,
> >>>> IRQF_DISABLED, "l3-dbg-irq", l3);
> >>>> if (ret) {
> >>>> - pr_crit("L3: request_irq failed to register for 0x%x\n",
> >>>> - l3->debug_irq);
> >>>> + dev_err(&pdev->dev, "request_irq failed for %d\n",
> >>>> + l3->debug_irq);
> >>>> return ret;
> >>>> }
> >>>>
> >>>> @@ -167,8 +167,7 @@ static int omap4_l3_probe(struct platform_device *pdev)
> >>>> ret = devm_request_irq(&pdev->dev, l3->app_irq, l3_interrupt_handler,
> >>>> IRQF_DISABLED, "l3-app-irq", l3);
> >>>> if (ret)
> >>>> - pr_crit("L3: request_irq failed to register for 0x%x\n",
> >>>> - l3->app_irq);
> >>>> + dev_err(&pdev->dev, "request_irq failed for %d\n", l3->app_irq);
> >>>>
> >>>> return ret;
> >>>> }
> >>>>
> >>> So this one change in the log level. If I look at now, may be dev_err
> >>> is fine but the change is not same.
> >>
> >> Not sure what you mean by 'the change is not same'?
> >> I just picked the old series and rebased it on linux-next, the patch is the
> >> same as it was back in May 2013:
> >> https://lkml.org/lkml/2013/5/2/205
> >>
> >> And yes, I have shortened the texts in the print, but the meaning of the
> >> prints have not changed.
> >
> > Santosh, got any more comments on this series?
> >
> Nope. looks good
OK probably best that Arnd or Olof picks these directly:
Acked-by: Tony Lindgren <tony@atomide.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-03-12 21:11 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-04 12:48 [PATCH v3 0/5] drivers: bus: omap_l3: Conversion to devm_* Peter Ujfalusi
2014-03-04 12:48 ` [PATCH v3 1/5] drivers: bus: omap_l3: Convert to use devm_kzalloc Peter Ujfalusi
2014-03-04 12:48 ` [PATCH v3 2/5] drivers: bus: omap_l3: Convert to use devm_ioremap_resource() Peter Ujfalusi
2014-03-04 12:48 ` [PATCH v3 3/5] drivers: bus: omap_l3: Convert to use devm_request_irq() Peter Ujfalusi
2014-03-04 12:48 ` [PATCH v3 4/5] drivers: bus: omap_l3: Remove the platform driver's remove function Peter Ujfalusi
2014-03-04 12:48 ` [PATCH v3 5/5] drivers: bus: omap_l3: Change pr_crit() to dev_err() when IRQ request fails Peter Ujfalusi
2014-03-04 14:37 ` Santosh Shilimkar
2014-03-05 7:11 ` Peter Ujfalusi
2014-03-12 17:28 ` Tony Lindgren
2014-03-12 21:05 ` Santosh Shilimkar
2014-03-12 21:11 ` Tony Lindgren
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).