diff mbox

[3/3] regulator: 88pm800: Add dev_info to show probe success status

Message ID 1436445692-10656-4-git-send-email-vaibhav.hiremath@linaro.org (mailing list archive)
State New, archived
Headers show

Commit Message

Vaibhav Hiremath July 9, 2015, 12:41 p.m. UTC
This patch adds dev_info line at the end of probe function, to
clearly put status of regulator probe on console. Useful during
development, specially to check bootlog.

Signed-off-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org>
---
 drivers/regulator/88pm800.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Mark Brown July 9, 2015, 7:05 p.m. UTC | #1
On Thu, Jul 09, 2015 at 06:11:32PM +0530, Vaibhav Hiremath wrote:
> This patch adds dev_info line at the end of probe function, to
> clearly put status of regulator probe on console. Useful during
> development, specially to check bootlog.

> +	dev_info(&pdev->dev, "Regulator registered ...\n");
>  	return 0;

No, this is pure noise - all you're doing is slowing down boot for users
with no content.  Think about what would happen if every driver did
this.  The core already displays the constraints when things are
registered.
Valdis Klētnieks July 9, 2015, 7:36 p.m. UTC | #2
On Thu, 09 Jul 2015 18:11:32 +0530, Vaibhav Hiremath said:
> This patch adds dev_info line at the end of probe function, to
> clearly put status of regulator probe on console. Useful during
> development, specially to check bootlog.

I can see that as a development thing...

> +	dev_info(&pdev->dev, "Regulator registered ...\n");

In which case this should be 'dev_debug()' or similar so it doesn't
clutter up and slow down a production boot.
Mark Brown July 9, 2015, 10:05 p.m. UTC | #3
On Thu, Jul 09, 2015 at 03:36:54PM -0400, Valdis.Kletnieks@vt.edu wrote:
> On Thu, 09 Jul 2015 18:11:32 +0530, Vaibhav Hiremath said:

> > +	dev_info(&pdev->dev, "Regulator registered ...\n");

> In which case this should be 'dev_debug()' or similar so it doesn't
> clutter up and slow down a production boot.

It's not adding anything, there's plenty of debug messages you can turn
on in the core for things like device enumeration.
Vaibhav Hiremath July 10, 2015, 12:11 p.m. UTC | #4
On Friday 10 July 2015 12:35 AM, Mark Brown wrote:
> On Thu, Jul 09, 2015 at 06:11:32PM +0530, Vaibhav Hiremath wrote:
>> This patch adds dev_info line at the end of probe function, to
>> clearly put status of regulator probe on console. Useful during
>> development, specially to check bootlog.
>
>> +	dev_info(&pdev->dev, "Regulator registered ...\n");
>>   	return 0;
>
> No, this is pure noise - all you're doing is slowing down boot for users
> with no content.  Think about what would happen if every driver did
> this.  The core already displays the constraints when things are
> registered.
>


I was just trying my luck here :)

And honestly, this was useful for me atleast.

Thanks,
Vaibhav
Vaibhav Hiremath July 10, 2015, 12:12 p.m. UTC | #5
On Friday 10 July 2015 01:06 AM, Valdis.Kletnieks@vt.edu wrote:
> On Thu, 09 Jul 2015 18:11:32 +0530, Vaibhav Hiremath said:
>> This patch adds dev_info line at the end of probe function, to
>> clearly put status of regulator probe on console. Useful during
>> development, specially to check bootlog.
>
> I can see that as a development thing...
>
>> +	dev_info(&pdev->dev, "Regulator registered ...\n");
>
> In which case this should be 'dev_debug()' or similar so it doesn't
> clutter up and slow down a production boot.
>

Yeup,

Probably dev_debug would have been better here.

Thanks,
Vaibhav
diff mbox

Patch

diff --git a/drivers/regulator/88pm800.c b/drivers/regulator/88pm800.c
index fdebd23..ee4b370 100644
--- a/drivers/regulator/88pm800.c
+++ b/drivers/regulator/88pm800.c
@@ -453,6 +453,7 @@  static int pm800_regulator_probe(struct platform_device *pdev)
 		}
 	}
 
+	dev_info(&pdev->dev, "Regulator registered ...\n");
 	return 0;
 }