Re: [PATCH 1/3] intel_pstate: Use pr_fmt

From: Srinivas Pandruvada
Date: Tue Apr 05 2016 - 17:58:10 EST


On Tue, 2016-04-05 at 13:28 -0700, Joe Perches wrote:
> Prefix the output using the more common kernel style.
>
> Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
Acked-by: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>
> ---
> Âdrivers/cpufreq/intel_pstate.c | 18 ++++++++++--------
> Â1 file changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/cpufreq/intel_pstate.c
> b/drivers/cpufreq/intel_pstate.c
> index a382195..e674db8 100644
> --- a/drivers/cpufreq/intel_pstate.c
> +++ b/drivers/cpufreq/intel_pstate.c
> @@ -10,6 +10,8 @@
> Â * of the License.
> Â */
> Â
> +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
> +
> Â#include <linux/kernel.h>
> Â#include <linux/kernel_stat.h>
> Â#include <linux/module.h>
> @@ -436,7 +438,7 @@ static ssize_t store_no_turbo(struct kobject *a,
> struct attribute *b,
> Â
> Â update_turbo_state();
> Â if (limits->turbo_disabled) {
> - pr_warn("intel_pstate: Turbo disabled by BIOS or
> unavailable on processor\n");
> + pr_warn("Turbo disabled by BIOS or unavailable on
> processor\n");
> Â return -EPERM;
> Â }
> Â
> @@ -1107,7 +1109,7 @@ static int intel_pstate_init_cpu(unsigned int
> cpunum)
> Â
> Â intel_pstate_busy_pid_reset(cpu);
> Â
> - pr_debug("intel_pstate: controlling: cpu %d\n", cpunum);
> + pr_debug("controlling: cpu %d\n", cpunum);
> Â
> Â return 0;
> Â}
> @@ -1149,12 +1151,12 @@ static int intel_pstate_set_policy(struct
> cpufreq_policy *policy)
> Â
> Â if (policy->policy == CPUFREQ_POLICY_PERFORMANCE &&
> Â ÂÂÂÂpolicy->max >= policy->cpuinfo.max_freq) {
> - pr_debug("intel_pstate: set performance\n");
> + pr_debug("set performance\n");
> Â limits = &performance_limits;
> Â goto out;
> Â }
> Â
> - pr_debug("intel_pstate: set powersave\n");
> + pr_debug("set powersave\n");
> Â limits = &powersave_limits;
> Â limits->min_policy_pct = (policy->min * 100) / policy-
> >cpuinfo.max_freq;
> Â limits->min_policy_pct = clamp_t(int, limits-
> >min_policy_pct, 0 , 100);
> @@ -1206,7 +1208,7 @@ static void intel_pstate_stop_cpu(struct
> cpufreq_policy *policy)
> Â int cpu_num = policy->cpu;
> Â struct cpudata *cpu = all_cpu_data[cpu_num];
> Â
> - pr_debug("intel_pstate: CPU %d exiting\n", cpu_num);
> + pr_debug("CPU %d exiting\n", cpu_num);
> Â
> Â intel_pstate_clear_update_util_hook(cpu_num);
> Â
> @@ -1451,7 +1453,7 @@ hwp_cpu_matched:
> Â if (intel_pstate_platform_pwr_mgmt_exists())
> Â return -ENODEV;
> Â
> - pr_info("Intel P-state driver initializing.\n");
> + pr_info("Intel P-state driver initializing\n");
> Â
> Â all_cpu_data = vzalloc(sizeof(void *) *
> num_possible_cpus());
> Â if (!all_cpu_data)
> @@ -1468,7 +1470,7 @@ hwp_cpu_matched:
> Â intel_pstate_sysfs_expose_params();
> Â
> Â if (hwp_active)
> - pr_info("intel_pstate: HWP enabled\n");
> + pr_info("HWP enabled\n");
> Â
> Â return rc;
> Âout:
> @@ -1494,7 +1496,7 @@ static int __init intel_pstate_setup(char *str)
> Â if (!strcmp(str, "disable"))
> Â no_load = 1;
> Â if (!strcmp(str, "no_hwp")) {
> - pr_info("intel_pstate: HWP disabled\n");
> + pr_info("HWP disabled\n");
> Â no_hwp = 1;
> Â }
> Â if (!strcmp(str, "force"))