aboutsummaryrefslogtreecommitdiff
path: root/drivers/cpufreq/powernow-k7.c
diff options
context:
space:
mode:
authorJoe Perches2016-04-05 13:28:25 -0700
committerRafael J. Wysocki2016-04-09 01:35:18 +0200
commit1c5864e26c99cf32b51e878f3daf73a388d7561a (patch)
tree573c01b9df76d0d1ddd7d04955a8171cf08ed31c /drivers/cpufreq/powernow-k7.c
parentb49c22a6ca3656c68506fea57caf3d8f08878570 (diff)
cpufreq: Use consistent prefixing via pr_fmt
Use the more common kernel style adding a define for pr_fmt. Miscellanea: o Remove now unused PFX defines Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/powernow-k7.c')
-rw-r--r--drivers/cpufreq/powernow-k7.c43
1 files changed, 21 insertions, 22 deletions
diff --git a/drivers/cpufreq/powernow-k7.c b/drivers/cpufreq/powernow-k7.c
index 4a1b420da72e..9f013ed42977 100644
--- a/drivers/cpufreq/powernow-k7.c
+++ b/drivers/cpufreq/powernow-k7.c
@@ -13,6 +13,8 @@
* - We disable half multipliers if ACPI is used on A0 stepping CPUs.
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
@@ -35,9 +37,6 @@
#include "powernow-k7.h"
-#define PFX "powernow: "
-
-
struct psb_s {
u8 signature[10];
u8 tableversion;
@@ -127,13 +126,13 @@ static int check_powernow(void)
maxei = cpuid_eax(0x80000000);
if (maxei < 0x80000007) { /* Any powernow info ? */
#ifdef MODULE
- pr_info(PFX "No powernow capabilities detected\n");
+ pr_info("No powernow capabilities detected\n");
#endif
return 0;
}
if ((c->x86_model == 6) && (c->x86_mask == 0)) {
- pr_info(PFX "K7 660[A0] core detected, enabling errata workarounds\n");
+ pr_info("K7 660[A0] core detected, enabling errata workarounds\n");
have_a0 = 1;
}
@@ -143,7 +142,7 @@ static int check_powernow(void)
if (!(edx & (1 << 1 | 1 << 2)))
return 0;
- pr_info(PFX "PowerNOW! Technology present. Can scale: ");
+ pr_info("PowerNOW! Technology present. Can scale: ");
if (edx & 1 << 1) {
pr_cont("frequency");
@@ -426,14 +425,14 @@ err1:
err05:
kfree(acpi_processor_perf);
err0:
- pr_warn(PFX "ACPI perflib can not be used on this platform\n");
+ pr_warn("ACPI perflib can not be used on this platform\n");
acpi_processor_perf = NULL;
return retval;
}
#else
static int powernow_acpi_init(void)
{
- pr_info(PFX "no support for ACPI processor found - please recompile your kernel with ACPI processor\n");
+ pr_info("no support for ACPI processor found - please recompile your kernel with ACPI processor\n");
return -EINVAL;
}
#endif
@@ -465,7 +464,7 @@ static int powernow_decode_bios(int maxfid, int startvid)
psb = (struct psb_s *) p;
pr_debug("Table version: 0x%x\n", psb->tableversion);
if (psb->tableversion != 0x12) {
- pr_info(PFX "Sorry, only v1.2 tables supported right now\n");
+ pr_info("Sorry, only v1.2 tables supported right now\n");
return -ENODEV;
}
@@ -477,7 +476,7 @@ static int powernow_decode_bios(int maxfid, int startvid)
latency = psb->settlingtime;
if (latency < 100) {
- pr_info(PFX "BIOS set settling time to %d microseconds. Should be at least 100. Correcting.\n",
+ pr_info("BIOS set settling time to %d microseconds. Should be at least 100. Correcting.\n",
latency);
latency = 100;
}
@@ -510,9 +509,9 @@ static int powernow_decode_bios(int maxfid, int startvid)
p += 2;
}
}
- pr_info(PFX "No PST tables match this cpuid (0x%x)\n",
+ pr_info("No PST tables match this cpuid (0x%x)\n",
etuple);
- pr_info(PFX "This is indicative of a broken BIOS\n");
+ pr_info("This is indicative of a broken BIOS\n");
return -EINVAL;
}
@@ -545,7 +544,7 @@ static int fixup_sgtc(void)
sgtc = 100 * m * latency;
sgtc = sgtc / 3;
if (sgtc > 0xfffff) {
- pr_warn(PFX "SGTC too large %d\n", sgtc);
+ pr_warn("SGTC too large %d\n", sgtc);
sgtc = 0xfffff;
}
return sgtc;
@@ -567,10 +566,10 @@ static unsigned int powernow_get(unsigned int cpu)
static int acer_cpufreq_pst(const struct dmi_system_id *d)
{
- pr_warn(PFX "%s laptop with broken PST tables in BIOS detected\n",
+ pr_warn("%s laptop with broken PST tables in BIOS detected\n",
d->ident);
- pr_warn(PFX "You need to downgrade to 3A21 (09/09/2002), or try a newer BIOS than 3A71 (01/20/2003)\n");
- pr_warn(PFX "cpufreq scaling has been disabled as a result of this\n");
+ pr_warn("You need to downgrade to 3A21 (09/09/2002), or try a newer BIOS than 3A71 (01/20/2003)\n");
+ pr_warn("cpufreq scaling has been disabled as a result of this\n");
return 0;
}
@@ -605,37 +604,37 @@ static int powernow_cpu_init(struct cpufreq_policy *policy)
fsb = (10 * cpu_khz) / fid_codes[fidvidstatus.bits.CFID];
if (!fsb) {
- pr_warn(PFX "can not determine bus frequency\n");
+ pr_warn("can not determine bus frequency\n");
return -EINVAL;
}
pr_debug("FSB: %3dMHz\n", fsb/1000);
if (dmi_check_system(powernow_dmi_table) || acpi_force) {
- pr_info(PFX "PSB/PST known to be broken - trying ACPI instead\n");
+ pr_info("PSB/PST known to be broken - trying ACPI instead\n");
result = powernow_acpi_init();
} else {
result = powernow_decode_bios(fidvidstatus.bits.MFID,
fidvidstatus.bits.SVID);
if (result) {
- pr_info(PFX "Trying ACPI perflib\n");
+ pr_info("Trying ACPI perflib\n");
maximum_speed = 0;
minimum_speed = -1;
latency = 0;
result = powernow_acpi_init();
if (result) {
- pr_info(PFX "ACPI and legacy methods failed\n");
+ pr_info("ACPI and legacy methods failed\n");
}
} else {
/* SGTC use the bus clock as timer */
latency = fixup_sgtc();
- pr_info(PFX "SGTC: %d\n", latency);
+ pr_info("SGTC: %d\n", latency);
}
}
if (result)
return result;
- pr_info(PFX "Minimum speed %d MHz - Maximum speed %d MHz\n",
+ pr_info("Minimum speed %d MHz - Maximum speed %d MHz\n",
minimum_speed/1000, maximum_speed/1000);
policy->cpuinfo.transition_latency =