From patchwork Tue Aug 9 16:34:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 1050382 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p79GYeKQ000514 for ; Tue, 9 Aug 2011 16:34:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753930Ab1HIQeo (ORCPT ); Tue, 9 Aug 2011 12:34:44 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:45654 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753884Ab1HIQen (ORCPT ); Tue, 9 Aug 2011 12:34:43 -0400 Received: by mail-fx0-f46.google.com with SMTP id 19so192442fxh.19 for ; Tue, 09 Aug 2011 09:34:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=LVerdABO/8av8WxT2ntX4veJJere2Rjs9zM6QSa9Rxg=; b=GGUkqxQU/qokILj+miqQJguZyryzZ0xpUj9QdUSPbDEHL3KxnQ55WHVrU6Lyjm4Le8 a93CMFkAJfveOMXQXwCbtoVS+6KWwQbovx83ZiwPoWul9t0GhZUiK35ekWAW6W/eJfiw y+BcH8c3ssdIjVSIl4keppqTAW/IqsHZJaDxI= Received: by 10.223.1.135 with SMTP id 7mr1859592faf.46.1312907683042; Tue, 09 Aug 2011 09:34:43 -0700 (PDT) Received: from xi ([83.249.240.82]) by mx.google.com with ESMTPS id x2sm58832fal.44.2011.08.09.09.34.41 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 09 Aug 2011 09:34:42 -0700 (PDT) Received: from johan by xi with local (Exim 4.76) (envelope-from ) id 1QqpGJ-0006Nl-OH; Tue, 09 Aug 2011 18:34:39 +0200 From: Johan Hovold To: Tony Lindgren Cc: Kevin Hilman , linux-omap@vger.kernel.org, Johan Hovold Subject: [PATCH 3/3] OMAP2+: voltage: clean up error messages Date: Tue, 9 Aug 2011 18:34:21 +0200 Message-Id: <1312907661-24436-3-git-send-email-jhovold@gmail.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1312907661-24436-1-git-send-email-jhovold@gmail.com> References: <1312907661-24436-1-git-send-email-jhovold@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Tue, 09 Aug 2011 16:34:58 +0000 (UTC) Clean up error messages by adding missing whitespace, reducing excessive verbosity, and fixing a few language issues. Signed-off-by: Johan Hovold --- arch/arm/mach-omap2/voltage.c | 51 ++++++++++++++++++---------------------- 1 files changed, 23 insertions(+), 28 deletions(-) diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c index 9ef3789..0b460b9 100644 --- a/arch/arm/mach-omap2/voltage.c +++ b/arch/arm/mach-omap2/voltage.c @@ -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; }