OMAP2+: pm: fix typos
PATCH 1/3 OMAP2+: pm: fix typos
Fix typos in comment and error message.
--- arch/arm/mach-omap2/pm.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/pm.c +3 -3
@@ -163,11 +163,11 @@ err: }/* -* This API is to be called during init to put the various voltage +* This API is to be called during init to set the various voltage * domains to the voltage as per the opp table. Typically we boot up * at the nominal voltage. So this function finds out the rate of * the clock associated with the voltage domain, finds out the correct -* opp entry and puts the voltage domain to the voltage specifies +* opp entry and sets the voltage domain to the voltage specified * in the opp entry */ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
@@ -218,7 +218,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,return 0 ; exit: -printk (KERN_ERR "%s: Unable to put vdd_%s to its init voltage\n\n" , +printk (KERN_ERR "%s: Unable to set vdd_%s to its init voltage\n\n" , __func__, vdd_name);return -EINVAL ; }
Signature · 1 line
1.7.6
PATCH 2/3 OMAP2+: pm: clean up error messages
Replace all printks with pr_err.
Clean up error messages by adding missing whitespace, fixing capitalisations, removing double newlines, and reducing verbosity.
--- arch/arm/mach-omap2/pm.c | 18 ++++++++---------- 1 files changed, 8 insertions(+), 10 deletions(-)
arch/arm/mach-omap2/pm.c +8 -10
@@ -137,8 +137,8 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) ret =pwrdm_set_next_pwrst (pwrdm, state);if (ret) { -printk (KERN_ERR "Unable to set state of powerdomain: %s\n" , - pwrdm->name); +pr_err ("%s: unable to set state of powerdomain: %s\n" , + __func__, pwrdm->name); goto err; }
@@ -179,21 +179,20 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,unsigned long freq, bootup_volt;if (!vdd_name || !clk_name || !dev) { -printk (KERN_ERR "%s: Invalid parameters!\n" , __func__); +pr_err ("%s: invalid parameters\n" , __func__); goto exit; } voltdm =omap_voltage_domain_lookup (vdd_name);if (IS_ERR (voltdm)) { -printk (KERN_ERR "%s: Unable to get vdd pointer for vdd_%s\n" , +pr_err ("%s: unable to get vdd pointer for vdd_%s\n" , __func__, vdd_name); goto exit; } clk =clk_get (NULL , clk_name);if (IS_ERR (clk)) { -printk (KERN_ERR "%s: unable to get clk %s\n" , - __func__, clk_name); +pr_err ("%s: unable to get clk %s\n" , __func__, clk_name); goto exit; }
@@ -202,14 +201,14 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, opp =opp_find_freq_ceil (dev, &freq);if (IS_ERR (opp)) { -printk (KERN_ERR "%s: unable to find boot up OPP for vdd_%s\n" , +pr_err ("%s: unable to find boot up OPP for vdd_%s\n" , __func__, vdd_name); goto exit; } bootup_volt =opp_get_voltage (opp);if (!bootup_volt) { -printk (KERN_ERR "%s: unable to find voltage corresponding" +pr_err ("%s: unable to find voltage corresponding " "to the bootup OPP for vdd_%s\n" , __func__, vdd_name); goto exit; }
@@ -218,8 +217,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,return 0 ; exit: -printk (KERN_ERR "%s: Unable to set vdd_%s to its init voltage\n\n" , - __func__, vdd_name); +pr_err ("%s: unable to set vdd_%s\n" , __func__, vdd_name);return -EINVAL ; }
Signature · 1 line
1.7.6
PATCH 3/3 OMAP2+: voltage: clean up error messages
In reply to Johan HovoldClean up error messages by adding missing whitespace, reducing excessive verbosity, and fixing a few language issues.
--- arch/arm/mach-omap2/voltage.c | 51 ++++++++++++++++++---------------------- 1 files changed, 23 insertions(+), 28 deletions(-)
arch/arm/mach-omap2/voltage.c +23 -28
@@ -104,7 +104,7 @@ static int __init _config_common_vdd_data(struct omap_vdd_info *vdd)*/ sys_ck =clk_get (NULL , sys_ck_name);if (IS_ERR (sys_ck)) { -pr_warning ("%s: Could not get the sys clk to calculate" +pr_warning ("%s: Could not get the sys clk to calculate " "various vdd_%s params\n" , __func__, vdd->voltdm.name);return -EINVAL ; }
@@ -143,14 +143,14 @@ static int vp_volt_debug_get(void *data, u64 *val)u8 vsel;if (!vdd) { -pr_warning ("Wrong paramater passed\n" ); +pr_warning ("Wrong parameter passed\n" );return -EINVAL ; } vsel = vdd->read_reg (prm_mod_offs, vdd->vp_data->voltage);if (!vdd->pmic_info->vsel_to_uv) { -pr_warning ("PMIC function to convert vsel to voltage" +pr_warning ("PMIC function to convert vsel to voltage " "in uV not registerd\n" );return -EINVAL ; }
@@ -164,7 +164,7 @@ static int nom_volt_debug_get(void *data, u64 *val)struct omap_vdd_info *vdd = (struct omap_vdd_info *) data;if (!vdd) { -pr_warning ("Wrong paramater passed\n" ); +pr_warning ("Wrong parameter passed\n" );return -EINVAL ; }
@@ -312,15 +312,14 @@ static int _pre_volt_scale(struct omap_vdd_info *vdd,/* Check if suffiecient pmic info is available for this vdd */ if (!vdd->pmic_info) { -pr_err ("%s: Insufficient pmic info to scale the vdd_%s\n" , +pr_err ("%s: No PMIC info for vdd_%s\n" , __func__, vdd->voltdm.name);return -EINVAL ; }if (!vdd->pmic_info->uv_to_vsel) { -pr_err ("%s: PMIC function to convert voltage in uV to" -"vsel not registered. Hence unable to scale voltage" -"for vdd_%s\n" , __func__, vdd->voltdm.name); +pr_err ("%s: No PMIC function to convert voltage in uV to " +"vsel for vdd_%s\n" , __func__, vdd->voltdm.name);return -ENODATA ; }
@@ -452,7 +451,7 @@ static int vp_forceupdate_scale_voltage(struct omap_vdd_info *vdd,udelay (1 ); }if (timeout >=VP_TRANXDONE_TIMEOUT ) { -pr_warning ("%s: vdd_%s TRANXDONE timeout exceeded." +pr_warning ("%s: vdd_%s TRANXDONE timeout exceeded. " "Voltage change aborted" , __func__, vdd->voltdm.name);return -ETIMEDOUT ; }
@@ -483,7 +482,7 @@ static int vp_forceupdate_scale_voltage(struct omap_vdd_info *vdd, vdd->vp_data->prm_irqst_data->tranxdone_status), VP_TRANXDONE_TIMEOUT, timeout);if (timeout >=VP_TRANXDONE_TIMEOUT ) -pr_err ("%s: vdd_%s TRANXDONE timeout exceeded." +pr_err ("%s: vdd_%s TRANXDONE timeout exceeded. " "TRANXDONE never got set after the voltage update\n" , __func__, vdd->voltdm.name);
@@ -505,7 +504,7 @@ static int vp_forceupdate_scale_voltage(struct omap_vdd_info *vdd,if (timeout >=VP_TRANXDONE_TIMEOUT )pr_warning ("%s: vdd_%s TRANXDONE timeout exceeded while trying" -"to clear the TRANXDONE status\n" , +" to clear the TRANXDONE status\n" , __func__, vdd->voltdm.name); vpconfig = vdd->read_reg (prm_mod_offs, vdd->vp_data->vpconfig);
@@ -599,8 +598,7 @@ static void __init omap_vc_init(struct omap_vdd_info *vdd)u32 vc_val;if (!vdd->pmic_info || !vdd->pmic_info->uv_to_vsel) { -pr_err ("%s: PMIC info requried to configure vc for" -"vdd_%s not populated.Hence cannot initialize vc\n" , +pr_err ("%s: No PMIC info for vdd_%s\n" , __func__, vdd->voltdm.name);return ; }
@@ -645,9 +643,8 @@ static int __init omap_vdd_data_configure(struct omap_vdd_info *vdd)int ret = -EINVAL ;if (!vdd->pmic_info) { -pr_err ("%s: PMIC info requried to configure vdd_%s not" -"populated.Hence cannot initialize vdd_%s\n" , - __func__, vdd->voltdm.name, vdd->voltdm.name); +pr_err ("%s: No PMIC info for vdd_%s\n" , + __func__, vdd->voltdm.name); goto ovdc_out; }
@@ -716,8 +713,8 @@ unsigned long omap_vp_get_curr_volt(struct voltagedomain *voltdm) curr_vsel = vdd->read_reg (prm_mod_offs, vdd->vp_data->voltage);if (!vdd->pmic_info || !vdd->pmic_info->vsel_to_uv) { -pr_warning ("%s: PMIC function to convert vsel to voltage" -"in uV not registerd\n" , __func__); +pr_warning ("%s: No PMIC function to convert vsel to uV " +"for vdd_%s\n" , __func__, voltdm->name);return 0 ; }
@@ -788,7 +785,7 @@ void omap_vp_disable(struct voltagedomain *voltdm)/* If VP is already disabled, do nothing. Return */ if (!vdd->vp_enabled) { -pr_warning ("%s: Trying to disable VP for vdd_%s when" +pr_warning ("%s: Trying to disable VP for vdd_%s when " "it is already disabled\n" , __func__, voltdm->name);return ; }
@@ -805,7 +802,7 @@ void omap_vp_disable(struct voltagedomain *voltdm) VP_IDLE_TIMEOUT, timeout);if (timeout >=VP_IDLE_TIMEOUT ) -pr_warning ("%s: vdd_%s idle timedout\n" , +pr_warning ("%s: vdd_%s idle timeout\n" , __func__, voltdm->name); vdd->vp_enabled = false;
@@ -937,7 +934,7 @@ struct omap_volt_data *omap_voltage_get_voltdata(struct voltagedomain *voltdm,return &vdd->volt_data[i]; } -pr_notice ("%s: Unable to match the current voltage with the voltage" +pr_notice ("%s: Unable to match the current voltage with the voltage " "table for vdd_%s\n" , __func__, voltdm->name);return ERR_PTR (-ENODATA );
@@ -1024,8 +1021,8 @@ void omap_change_voltscale_method(struct voltagedomain *voltdm, vdd->volt_scale = vc_bypass_scale_voltage;return ;default : -pr_warning ("%s: Trying to change the method of voltage scaling" -"to an unsupported one!\n" , __func__); +pr_warning ("%s: Voltage scale method not supported\n" , + __func__); } }
@@ -1043,13 +1040,12 @@ struct voltagedomain *omap_voltage_domain_lookup(char *name)int i;if (!vdd_info) { -pr_err ("%s: Voltage driver init not yet happened.Faulting!\n" , - __func__); +pr_err ("%s: Voltage driver not initialised\n" , __func__);return ERR_PTR (-EINVAL ); }if (!name) { -pr_err ("%s: No name to get the votage domain!\n" , __func__); +pr_err ("%s: Missing voltage-domain name\n" , __func__);return ERR_PTR (-EINVAL ); }
@@ -1073,8 +1069,7 @@ int __init omap_voltage_late_init(void)int i;if (!vdd_info) { -pr_err ("%s: Voltage driver support not added\n" , - __func__); +pr_err ("%s: Voltage driver support not added\n" , __func__);return -EINVAL ; }
Signature · 1 line
1.7.6
Re: [PATCH 3/3] OMAP2+: voltage: clean up error messages
Hi Johan,
Quoted 4 lines · Johan Hovold
Clean up error messages by adding missing whitespace, reducing excessive verbosity, and fixing a few language issues.
Signed-off-by Johan Hovold <[email protected]>
I've got a major voltage layer cleanup series in progess (and just posted a few series.) Would you care to rebase this on top my pm-wip/voldtm branch[1] where those cleanups are being done?
Thanks,
Kevin
[1] git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git pm-wip/voltdm
Re: [PATCH 3/3] OMAP2+: voltage: clean up error messages
Quoted 4 lines · Kevin Hilman
Hi Johan,
Johan Hovold <[email protected]> writes:
Quoted 8 lines
Quoted 4 lines
Clean up error messages by adding missing whitespace, reducing excessive verbosity, and fixing a few language issues.
Signed-off-by Johan Hovold <[email protected]>I've got a major voltage layer cleanup series in progess (and just posted a few series.) Would you care to rebase this on top my pm-wip/voldtm branch[1] where those cleanups are being done?
I just resent patches 1 and 2 with proper CC and will try to respin patch 3 against your voltdm branch in a few days.
Thanks,
Johan
Hi Johan,
Quoted 3 lines · Johan Hovold
Fix typos in comment and error message.
Signed-off-by Johan Hovold <[email protected]>
Thanks for these PM-related cleanups. They're much appreciated.
Patches 1 & 2 look fine. However, can you please repost with the
linux-arm-kernel mailing list in Cc? All patches for upstream should
also Cc that list: [email protected]
Kevin
Quoted 31 lines
--- arch/arm/mach-omap2/pm.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)arch/arm/mach-omap2/pm.c +3
-3@@ -163,11 +163,11 @@ err: }/* -* This API is to be called during init to put the various voltage +* This API is to be called during init to set the various voltage * domains to the voltage as per the opp table. Typically we boot up * at the nominal voltage. So this function finds out the rate of * the clock associated with the voltage domain, finds out the correct -* opp entry and puts the voltage domain to the voltage specifies +* opp entry and sets the voltage domain to the voltage specified * in the opp entry */ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,@@ -218,7 +218,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,return 0 ; exit: -printk (KERN_ERR "%s: Unable to put vdd_%s to its init voltage\n\n" , +printk (KERN_ERR "%s: Unable to set vdd_%s to its init voltage\n\n" , __func__, vdd_name);return -EINVAL ; }
PATCH RESEND 1/2 OMAP2+: pm: fix typos
Fix typos in comment and error message.
--- arch/arm/mach-omap2/pm.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-omap2/pm.c +3 -3
@@ -163,11 +163,11 @@ err: }/* -* This API is to be called during init to put the various voltage +* This API is to be called during init to set the various voltage * domains to the voltage as per the opp table. Typically we boot up * at the nominal voltage. So this function finds out the rate of * the clock associated with the voltage domain, finds out the correct -* opp entry and puts the voltage domain to the voltage specifies +* opp entry and sets the voltage domain to the voltage specified * in the opp entry */ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,
@@ -218,7 +218,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,return 0 ; exit: -printk (KERN_ERR "%s: Unable to put vdd_%s to its init voltage\n\n" , +printk (KERN_ERR "%s: Unable to set vdd_%s to its init voltage\n\n" , __func__, vdd_name);return -EINVAL ; }
Signature · 1 line
1.7.6
PATCH RESEND 2/2 OMAP2+: pm: clean up error messages
Replace all printks with pr_err.
Clean up error messages by adding missing whitespace, fixing capitalisations, removing double newlines, and reducing verbosity.
--- arch/arm/mach-omap2/pm.c | 18 ++++++++---------- 1 files changed, 8 insertions(+), 10 deletions(-)
arch/arm/mach-omap2/pm.c +8 -10
@@ -137,8 +137,8 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) ret =pwrdm_set_next_pwrst (pwrdm, state);if (ret) { -printk (KERN_ERR "Unable to set state of powerdomain: %s\n" , - pwrdm->name); +pr_err ("%s: unable to set state of powerdomain: %s\n" , + __func__, pwrdm->name); goto err; }
@@ -179,21 +179,20 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,unsigned long freq, bootup_volt;if (!vdd_name || !clk_name || !dev) { -printk (KERN_ERR "%s: Invalid parameters!\n" , __func__); +pr_err ("%s: invalid parameters\n" , __func__); goto exit; } voltdm =omap_voltage_domain_lookup (vdd_name);if (IS_ERR (voltdm)) { -printk (KERN_ERR "%s: Unable to get vdd pointer for vdd_%s\n" , +pr_err ("%s: unable to get vdd pointer for vdd_%s\n" , __func__, vdd_name); goto exit; } clk =clk_get (NULL , clk_name);if (IS_ERR (clk)) { -printk (KERN_ERR "%s: unable to get clk %s\n" , - __func__, clk_name); +pr_err ("%s: unable to get clk %s\n" , __func__, clk_name); goto exit; }
@@ -202,14 +201,14 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, opp =opp_find_freq_ceil (dev, &freq);if (IS_ERR (opp)) { -printk (KERN_ERR "%s: unable to find boot up OPP for vdd_%s\n" , +pr_err ("%s: unable to find boot up OPP for vdd_%s\n" , __func__, vdd_name); goto exit; } bootup_volt =opp_get_voltage (opp);if (!bootup_volt) { -printk (KERN_ERR "%s: unable to find voltage corresponding" +pr_err ("%s: unable to find voltage corresponding " "to the bootup OPP for vdd_%s\n" , __func__, vdd_name); goto exit; }
@@ -218,8 +217,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,return 0 ; exit: -printk (KERN_ERR "%s: Unable to set vdd_%s to its init voltage\n\n" , - __func__, vdd_name); +pr_err ("%s: unable to set vdd_%s\n" , __func__, vdd_name);return -EINVAL ; }
Signature · 1 line
1.7.6
PATCH RESEND 2/2 OMAP2+: pm: clean up error messages
Quoted 6 lines · Johan Hovold
Replace all printks with
pr_err.Clean up error messages by adding missing whitespace, fixing capitalisations, removing double newlines, and reducing verbosity.
Signed-off-by Johan Hovold <[email protected]>
Thanks, queuing for v3.2 (branch: for_3.2/pm-cleanup)
Kevin
Quoted 70 lines
--- arch/arm/mach-omap2/pm.c | 18 ++++++++---------- 1 files changed, 8 insertions(+), 10 deletions(-)arch/arm/mach-omap2/pm.c +8
-10@@ -137,8 +137,8 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state) ret =pwrdm_set_next_pwrst (pwrdm, state);if (ret) { -printk (KERN_ERR "Unable to set state of powerdomain: %s\n" , - pwrdm->name); +pr_err ("%s: unable to set state of powerdomain: %s\n" , + __func__, pwrdm->name); goto err; }@@ -179,21 +179,20 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,unsigned long freq, bootup_volt;if (!vdd_name || !clk_name || !dev) { -printk (KERN_ERR "%s: Invalid parameters!\n" , __func__); +pr_err ("%s: invalid parameters\n" , __func__); goto exit; } voltdm =omap_voltage_domain_lookup (vdd_name);if (IS_ERR (voltdm)) { -printk (KERN_ERR "%s: Unable to get vdd pointer for vdd_%s\n" , +pr_err ("%s: unable to get vdd pointer for vdd_%s\n" , __func__, vdd_name); goto exit; } clk =clk_get (NULL , clk_name);if (IS_ERR (clk)) { -printk (KERN_ERR "%s: unable to get clk %s\n" , - __func__, clk_name); +pr_err ("%s: unable to get clk %s\n" , __func__, clk_name); goto exit; }@@ -202,14 +201,14 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name, opp =opp_find_freq_ceil (dev, &freq);if (IS_ERR (opp)) { -printk (KERN_ERR "%s: unable to find boot up OPP for vdd_%s\n" , +pr_err ("%s: unable to find boot up OPP for vdd_%s\n" , __func__, vdd_name); goto exit; } bootup_volt =opp_get_voltage (opp);if (!bootup_volt) { -printk (KERN_ERR "%s: unable to find voltage corresponding" +pr_err ("%s: unable to find voltage corresponding " "to the bootup OPP for vdd_%s\n" , __func__, vdd_name); goto exit; }@@ -218,8 +217,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,return 0 ; exit: -printk (KERN_ERR "%s: Unable to set vdd_%s to its init voltage\n\n" , - __func__, vdd_name); +pr_err ("%s: unable to set vdd_%s\n" , __func__, vdd_name);return -EINVAL ; }
PATCH RESEND 1/2 OMAP2+: pm: fix typos
In reply to Johan HovoldQuoted 3 lines · Johan Hovold
Fix typos in comment and error message.
Signed-off-by Johan Hovold <[email protected]>
Thanks, queuing for v3.2 (branch: for_3.2/pm-cleanup)
Kevin
Quoted 31 lines
--- arch/arm/mach-omap2/pm.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)arch/arm/mach-omap2/pm.c +3
-3@@ -163,11 +163,11 @@ err: }/* -* This API is to be called during init to put the various voltage +* This API is to be called during init to set the various voltage * domains to the voltage as per the opp table. Typically we boot up * at the nominal voltage. So this function finds out the rate of * the clock associated with the voltage domain, finds out the correct -* opp entry and puts the voltage domain to the voltage specifies +* opp entry and sets the voltage domain to the voltage specified * in the opp entry */ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,@@ -218,7 +218,7 @@ static int __init omap2_set_init_voltage(char *vdd_name, char *clk_name,return 0 ; exit: -printk (KERN_ERR "%s: Unable to put vdd_%s to its init voltage\n\n" , +printk (KERN_ERR "%s: Unable to set vdd_%s to its init voltage\n\n" , __func__, vdd_name);return -EINVAL ; }