mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
cpufreq: Use %pe to print error pointers symbolically
Replace PTR_ERR() and %ld with %pe and pass the original pointer directly to pr_err() and pr_warn(). The %pe format specifier prints a symbolic error name (e.g. -ENOMEM) when CONFIG_SYMBOLIC_ERRNAME is enabled, otherwise it falls back gracefully and prints the raw integer value. This makes messages more readable without any functional change. Signed-off-by: Sumeet Pawnikar <sumeet4linux@gmail.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
This commit is contained in:
parent
53732733c7
commit
3b585d7fa3
|
|
@ -132,8 +132,8 @@ static int bmips_cpufreq_init(struct cpufreq_policy *policy)
|
|||
|
||||
freq_table = bmips_cpufreq_get_freq_table(policy);
|
||||
if (IS_ERR(freq_table)) {
|
||||
pr_err("%s: couldn't determine frequency table (%ld).\n",
|
||||
BMIPS_CPUFREQ_NAME, PTR_ERR(freq_table));
|
||||
pr_err("%s: couldn't determine frequency table (%pe).\n",
|
||||
BMIPS_CPUFREQ_NAME, freq_table);
|
||||
return PTR_ERR(freq_table);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -230,8 +230,8 @@ static void cppc_fie_kworker_init(void)
|
|||
|
||||
kworker_fie = kthread_run_worker(0, "cppc_fie");
|
||||
if (IS_ERR(kworker_fie)) {
|
||||
pr_warn("%s: failed to create kworker_fie: %ld\n", __func__,
|
||||
PTR_ERR(kworker_fie));
|
||||
pr_warn("%s: failed to create kworker_fie: %pe\n", __func__,
|
||||
kworker_fie);
|
||||
fie_disabled = FIE_DISABLED;
|
||||
kworker_fie = NULL;
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -57,8 +57,7 @@ static u32 get_bus_freq(void)
|
|||
/* get platform freq by its clock name */
|
||||
pltclk = clk_get(NULL, "cg-pll0-div1");
|
||||
if (IS_ERR(pltclk)) {
|
||||
pr_err("%s: can't get bus frequency %ld\n",
|
||||
__func__, PTR_ERR(pltclk));
|
||||
pr_err("%s: can't get bus frequency %pe\n", __func__, pltclk);
|
||||
return PTR_ERR(pltclk);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -152,15 +152,14 @@ static int s3c64xx_cpufreq_driver_init(struct cpufreq_policy *policy)
|
|||
|
||||
policy->clk = clk_get(NULL, "armclk");
|
||||
if (IS_ERR(policy->clk)) {
|
||||
pr_err("Unable to obtain ARMCLK: %ld\n",
|
||||
PTR_ERR(policy->clk));
|
||||
pr_err("Unable to obtain ARMCLK: %pe\n", policy->clk);
|
||||
return PTR_ERR(policy->clk);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_REGULATOR
|
||||
vddarm = regulator_get(NULL, "vddarm");
|
||||
if (IS_ERR(vddarm)) {
|
||||
pr_err("Failed to obtain VDDARM: %ld\n", PTR_ERR(vddarm));
|
||||
pr_err("Failed to obtain VDDARM: %pe\n", vddarm);
|
||||
pr_err("Only frequency scaling available\n");
|
||||
vddarm = NULL;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user