* [PATCH 1/2] mmc/host/sdhci-of-arasan.c: Use signed formatting in error messages
@ 2014-10-23 11:31 Mike Looijmans
2014-10-23 11:31 ` [PATCH 2/2] mmc/host/sdhci-of-arasan.c: Skip EPROBE_DEFER " Mike Looijmans
2014-10-27 15:38 ` [PATCH 1/2] mmc/host/sdhci-of-arasan.c: Use signed formatting in " Ulf Hansson
0 siblings, 2 replies; 8+ messages in thread
From: Mike Looijmans @ 2014-10-23 11:31 UTC (permalink / raw)
To: linux-mmc, linux-kernel; +Cc: michal.simek, chris, ulf.hansson, Mike Looijmans
"ret" is a signed int, so use "%d" in format strings instead of "%u".
This prevents cryptic codes in error messages like this:
sdhci-arasan e0101000.sdhci: platform register failed (4294966779)
Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Reviewed-by: Michal Simek <michal.simek@xilinx.com>
---
drivers/mmc/host/sdhci-of-arasan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index 8cf81c3..7ac6718 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -161,7 +161,7 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
host = sdhci_pltfm_init(pdev, &sdhci_arasan_pdata, 0);
if (IS_ERR(host)) {
ret = PTR_ERR(host);
- dev_err(&pdev->dev, "platform init failed (%u)\n", ret);
+ dev_err(&pdev->dev, "platform init failed (%d)\n", ret);
goto clk_disable_all;
}
@@ -172,7 +172,7 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
ret = sdhci_add_host(host);
if (ret) {
- dev_err(&pdev->dev, "platform register failed (%u)\n", ret);
+ dev_err(&pdev->dev, "platform register failed (%d)\n", ret);
goto err_pltfm_free;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] mmc/host/sdhci-of-arasan.c: Skip EPROBE_DEFER error messages
2014-10-23 11:31 [PATCH 1/2] mmc/host/sdhci-of-arasan.c: Use signed formatting in error messages Mike Looijmans
@ 2014-10-23 11:31 ` Mike Looijmans
2014-10-23 11:47 ` Michal Simek
2014-10-27 15:38 ` [PATCH 1/2] mmc/host/sdhci-of-arasan.c: Use signed formatting in " Ulf Hansson
1 sibling, 1 reply; 8+ messages in thread
From: Mike Looijmans @ 2014-10-23 11:31 UTC (permalink / raw)
To: linux-mmc, linux-kernel; +Cc: michal.simek, chris, ulf.hansson, Mike Looijmans
When the error code is -EPROBE_DEFER, this will already be reported
so don't emit an error message in that case.
Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
---
drivers/mmc/host/sdhci-of-arasan.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index 7ac6718..d5812a0 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -161,7 +161,8 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
host = sdhci_pltfm_init(pdev, &sdhci_arasan_pdata, 0);
if (IS_ERR(host)) {
ret = PTR_ERR(host);
- dev_err(&pdev->dev, "platform init failed (%d)\n", ret);
+ if (ret != -EPROBE_DEFER)
+ dev_err(&pdev->dev, "platform init failed (%d)\n", ret);
goto clk_disable_all;
}
@@ -172,7 +173,8 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
ret = sdhci_add_host(host);
if (ret) {
- dev_err(&pdev->dev, "platform register failed (%d)\n", ret);
+ if (ret != -EPROBE_DEFER)
+ dev_err(&pdev->dev, "platform register failed (%d)\n", ret);
goto err_pltfm_free;
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] mmc/host/sdhci-of-arasan.c: Skip EPROBE_DEFER error messages
2014-10-23 11:31 ` [PATCH 2/2] mmc/host/sdhci-of-arasan.c: Skip EPROBE_DEFER " Mike Looijmans
@ 2014-10-23 11:47 ` Michal Simek
2014-10-27 15:33 ` Ulf Hansson
0 siblings, 1 reply; 8+ messages in thread
From: Michal Simek @ 2014-10-23 11:47 UTC (permalink / raw)
To: Mike Looijmans, linux-mmc, linux-kernel; +Cc: michal.simek, chris, ulf.hansson
Hi Chris,
On 10/23/2014 01:31 PM, Mike Looijmans wrote:
> When the error code is -EPROBE_DEFER, this will already be reported
> so don't emit an error message in that case.
>
> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
> ---
> drivers/mmc/host/sdhci-of-arasan.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
> index 7ac6718..d5812a0 100644
> --- a/drivers/mmc/host/sdhci-of-arasan.c
> +++ b/drivers/mmc/host/sdhci-of-arasan.c
> @@ -161,7 +161,8 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
> host = sdhci_pltfm_init(pdev, &sdhci_arasan_pdata, 0);
> if (IS_ERR(host)) {
> ret = PTR_ERR(host);
> - dev_err(&pdev->dev, "platform init failed (%d)\n", ret);
> + if (ret != -EPROBE_DEFER)
> + dev_err(&pdev->dev, "platform init failed (%d)\n", ret);
> goto clk_disable_all;
> }
>
> @@ -172,7 +173,8 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
>
> ret = sdhci_add_host(host);
> if (ret) {
> - dev_err(&pdev->dev, "platform register failed (%d)\n", ret);
> + if (ret != -EPROBE_DEFER)
> + dev_err(&pdev->dev, "platform register failed (%d)\n", ret);
> goto err_pltfm_free;
> }
I checked other drivers and they are not reporting these bugs. I have briefly looked
at sdhci_add_host and sdhci_platfm_init and they are pretty good error description
+ core itself should report if driver probe failed.
That's why I think that it is just reasonable to remove these both dev_err completely.
What do you think?
Thanks,
Michal
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] mmc/host/sdhci-of-arasan.c: Skip EPROBE_DEFER error messages
2014-10-23 11:47 ` Michal Simek
@ 2014-10-27 15:33 ` Ulf Hansson
2014-10-28 7:53 ` Mike Looijmans
0 siblings, 1 reply; 8+ messages in thread
From: Ulf Hansson @ 2014-10-27 15:33 UTC (permalink / raw)
To: Michal Simek; +Cc: Mike Looijmans, linux-mmc, linux-kernel, Chris Ball
On 23 October 2014 13:47, Michal Simek <michal.simek@xilinx.com> wrote:
> Hi Chris,
>
> On 10/23/2014 01:31 PM, Mike Looijmans wrote:
>> When the error code is -EPROBE_DEFER, this will already be reported
>> so don't emit an error message in that case.
>>
>> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
>> ---
>> drivers/mmc/host/sdhci-of-arasan.c | 6 ++++--
>> 1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
>> index 7ac6718..d5812a0 100644
>> --- a/drivers/mmc/host/sdhci-of-arasan.c
>> +++ b/drivers/mmc/host/sdhci-of-arasan.c
>> @@ -161,7 +161,8 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
>> host = sdhci_pltfm_init(pdev, &sdhci_arasan_pdata, 0);
>> if (IS_ERR(host)) {
>> ret = PTR_ERR(host);
>> - dev_err(&pdev->dev, "platform init failed (%d)\n", ret);
>> + if (ret != -EPROBE_DEFER)
>> + dev_err(&pdev->dev, "platform init failed (%d)\n", ret);
>> goto clk_disable_all;
>> }
>>
>> @@ -172,7 +173,8 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
>>
>> ret = sdhci_add_host(host);
>> if (ret) {
>> - dev_err(&pdev->dev, "platform register failed (%d)\n", ret);
>> + if (ret != -EPROBE_DEFER)
>> + dev_err(&pdev->dev, "platform register failed (%d)\n", ret);
>> goto err_pltfm_free;
>> }
>
>
> I checked other drivers and they are not reporting these bugs. I have briefly looked
> at sdhci_add_host and sdhci_platfm_init and they are pretty good error description
> + core itself should report if driver probe failed.
> That's why I think that it is just reasonable to remove these both dev_err completely.
>
> What do you think?
I agree, this seems reasonable!
Kind regards
Uffe
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] mmc/host/sdhci-of-arasan.c: Use signed formatting in error messages
2014-10-23 11:31 [PATCH 1/2] mmc/host/sdhci-of-arasan.c: Use signed formatting in error messages Mike Looijmans
2014-10-23 11:31 ` [PATCH 2/2] mmc/host/sdhci-of-arasan.c: Skip EPROBE_DEFER " Mike Looijmans
@ 2014-10-27 15:38 ` Ulf Hansson
1 sibling, 0 replies; 8+ messages in thread
From: Ulf Hansson @ 2014-10-27 15:38 UTC (permalink / raw)
To: Mike Looijmans; +Cc: linux-mmc, linux-kernel, Michal Simek, Chris Ball
On 23 October 2014 13:31, Mike Looijmans <mike.looijmans@topic.nl> wrote:
> "ret" is a signed int, so use "%d" in format strings instead of "%u".
> This prevents cryptic codes in error messages like this:
> sdhci-arasan e0101000.sdhci: platform register failed (4294966779)
>
> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
> Reviewed-by: Michal Simek <michal.simek@xilinx.com>
Thanks! Applied for next.
I will expect a v2 of patch2.
Kind regards
Uffe
> ---
> drivers/mmc/host/sdhci-of-arasan.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
> index 8cf81c3..7ac6718 100644
> --- a/drivers/mmc/host/sdhci-of-arasan.c
> +++ b/drivers/mmc/host/sdhci-of-arasan.c
> @@ -161,7 +161,7 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
> host = sdhci_pltfm_init(pdev, &sdhci_arasan_pdata, 0);
> if (IS_ERR(host)) {
> ret = PTR_ERR(host);
> - dev_err(&pdev->dev, "platform init failed (%u)\n", ret);
> + dev_err(&pdev->dev, "platform init failed (%d)\n", ret);
> goto clk_disable_all;
> }
>
> @@ -172,7 +172,7 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
>
> ret = sdhci_add_host(host);
> if (ret) {
> - dev_err(&pdev->dev, "platform register failed (%u)\n", ret);
> + dev_err(&pdev->dev, "platform register failed (%d)\n", ret);
> goto err_pltfm_free;
> }
>
> --
> 1.7.9.5
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] mmc/host/sdhci-of-arasan.c: Skip EPROBE_DEFER error messages
2014-10-27 15:33 ` Ulf Hansson
@ 2014-10-28 7:53 ` Mike Looijmans
2014-10-28 7:53 ` [PATCH] mmc/host/sdhci-of-arasan.c: Omit superfluous " Mike Looijmans
0 siblings, 1 reply; 8+ messages in thread
From: Mike Looijmans @ 2014-10-28 7:53 UTC (permalink / raw)
To: linux-mmc; +Cc: linux-kernel, michal.simek, chris, ulf.hansson
As discussed here, I'll post a new patch which simply removes the error
messages.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] mmc/host/sdhci-of-arasan.c: Omit superfluous error messages
2014-10-28 7:53 ` Mike Looijmans
@ 2014-10-28 7:53 ` Mike Looijmans
2014-10-28 9:49 ` Ulf Hansson
0 siblings, 1 reply; 8+ messages in thread
From: Mike Looijmans @ 2014-10-28 7:53 UTC (permalink / raw)
To: linux-mmc; +Cc: linux-kernel, michal.simek, chris, ulf.hansson, Mike Looijmans
sdhci_add_host and sdhci_platfm_init already report failure,
so don't emit error messages when a failure occurs. This prevents
occurences of "deferred" messages when required power supplies
are not ready for operation yet.
Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
---
drivers/mmc/host/sdhci-of-arasan.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index 7ac6718..75bea2e 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -161,7 +161,6 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
host = sdhci_pltfm_init(pdev, &sdhci_arasan_pdata, 0);
if (IS_ERR(host)) {
ret = PTR_ERR(host);
- dev_err(&pdev->dev, "platform init failed (%d)\n", ret);
goto clk_disable_all;
}
@@ -171,10 +170,8 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
pltfm_host->clk = clk_xin;
ret = sdhci_add_host(host);
- if (ret) {
- dev_err(&pdev->dev, "platform register failed (%d)\n", ret);
+ if (ret)
goto err_pltfm_free;
- }
return 0;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] mmc/host/sdhci-of-arasan.c: Omit superfluous error messages
2014-10-28 7:53 ` [PATCH] mmc/host/sdhci-of-arasan.c: Omit superfluous " Mike Looijmans
@ 2014-10-28 9:49 ` Ulf Hansson
0 siblings, 0 replies; 8+ messages in thread
From: Ulf Hansson @ 2014-10-28 9:49 UTC (permalink / raw)
To: Mike Looijmans; +Cc: linux-mmc, linux-kernel, Michal Simek, Chris Ball
On 28 October 2014 08:53, Mike Looijmans <mike.looijmans@topic.nl> wrote:
> sdhci_add_host and sdhci_platfm_init already report failure,
> so don't emit error messages when a failure occurs. This prevents
> occurences of "deferred" messages when required power supplies
> are not ready for operation yet.
>
> Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Thanks! Applied for next.
Kind regards
Uffe
> ---
> drivers/mmc/host/sdhci-of-arasan.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
> index 7ac6718..75bea2e 100644
> --- a/drivers/mmc/host/sdhci-of-arasan.c
> +++ b/drivers/mmc/host/sdhci-of-arasan.c
> @@ -161,7 +161,6 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
> host = sdhci_pltfm_init(pdev, &sdhci_arasan_pdata, 0);
> if (IS_ERR(host)) {
> ret = PTR_ERR(host);
> - dev_err(&pdev->dev, "platform init failed (%d)\n", ret);
> goto clk_disable_all;
> }
>
> @@ -171,10 +170,8 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
> pltfm_host->clk = clk_xin;
>
> ret = sdhci_add_host(host);
> - if (ret) {
> - dev_err(&pdev->dev, "platform register failed (%d)\n", ret);
> + if (ret)
> goto err_pltfm_free;
> - }
>
> return 0;
>
> --
> 1.7.9.5
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-10-28 9:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-23 11:31 [PATCH 1/2] mmc/host/sdhci-of-arasan.c: Use signed formatting in error messages Mike Looijmans
2014-10-23 11:31 ` [PATCH 2/2] mmc/host/sdhci-of-arasan.c: Skip EPROBE_DEFER " Mike Looijmans
2014-10-23 11:47 ` Michal Simek
2014-10-27 15:33 ` Ulf Hansson
2014-10-28 7:53 ` Mike Looijmans
2014-10-28 7:53 ` [PATCH] mmc/host/sdhci-of-arasan.c: Omit superfluous " Mike Looijmans
2014-10-28 9:49 ` Ulf Hansson
2014-10-27 15:38 ` [PATCH 1/2] mmc/host/sdhci-of-arasan.c: Use signed formatting in " Ulf Hansson
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).