lkml.org 
[lkml]   [2014]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cpufreq: report driver's successful {un}registration
On 06/26/2014 02:21 PM, Viresh Kumar wrote:
> We do report driver's successful {un}registration from cpufreq core, but is done
> with pr_debug() and so this doesn't appear in boot logs.
>
> Convert this to pr_info() to make it visible in logs.
>

While at it, let's also standardize those messages, since they will be
more visible now.

> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> drivers/cpufreq/cpufreq.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 62259d2..63d8f8f 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -2468,7 +2468,7 @@ int cpufreq_register_driver(struct cpufreq_driver *driver_data)
> }
>
> register_hotcpu_notifier(&cpufreq_cpu_notifier);
> - pr_debug("driver %s up and running\n", driver_data->name);
> + pr_info("driver %s up and running\n", driver_data->name);

How about "Registered cpufreq driver: %s\n"

>
> return 0;
> err_if_unreg:
> @@ -2499,7 +2499,7 @@ int cpufreq_unregister_driver(struct cpufreq_driver *driver)
> if (!cpufreq_driver || (driver != cpufreq_driver))
> return -EINVAL;
>
> - pr_debug("unregistering driver %s\n", driver->name);
> + pr_info("unregistering driver %s\n", driver->name);

And "Unregistered cpufreq driver: %s\n"

(Also, its probably a good idea to have 2 prints here, just like we have for
cpufreq_register_driver() - one with pr_debug() at the beginning of the
function which tells us that we are *about* to register the driver, and then
a second print with pr_info() at the end of the function that tells us that
we successfully registered the driver. We can do the same thing for
unregistration as well.)

>
> subsys_interface_unregister(&cpufreq_interface);
> if (cpufreq_boost_supported())
>

Regards,
Srivatsa S. Bhat



\
 
 \ /
  Last update: 2014-07-10 14:21    [W:0.065 / U:3.240 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site