public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] regulator: Fix obfuscated log messages
@ 2010-11-22 13:51 Mark Brown
  2010-11-22 13:51 ` [PATCH 2/2] regulator: Remove regulator core version announcement Mark Brown
  2010-11-22 14:31 ` [PATCH 1/2] regulator: Fix obfuscated log messages Liam Girdwood
  0 siblings, 2 replies; 3+ messages in thread
From: Mark Brown @ 2010-11-22 13:51 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: linux-kernel, patches, Mark Brown

Don't use %s to format fixed static strings into log messages, it just
makes searching for and reading the message in the kernel source
needlessly hard.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/regulator/core.c |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 8d492f4..fe47860 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -760,7 +760,7 @@ static int machine_constraints_voltage(struct regulator_dev *rdev,
 
 		/* else require explicit machine-level constraints */
 		if (cmin <= 0 || cmax <= 0 || cmax < cmin) {
-			pr_err("%s '%s' voltage constraints\n", "invalid",
+			pr_err("invalid '%s' voltage constraints\n",
 				name);
 			return -EINVAL;
 		}
@@ -782,22 +782,20 @@ static int machine_constraints_voltage(struct regulator_dev *rdev,
 
 		/* final: [min_uV..max_uV] valid iff constraints valid */
 		if (max_uV < min_uV) {
-			pr_err("%s '%s' voltage constraints\n", "unsupportable",
+			pr_err("unsupportable '%s' voltage constraints\n",
 				name);
 			return -EINVAL;
 		}
 
 		/* use regulator's subset of machine constraints */
 		if (constraints->min_uV < min_uV) {
-			pr_debug("override '%s' %s, %d -> %d\n",
-				 name, "min_uV",
-				 constraints->min_uV, min_uV);
+			pr_debug("override '%s' min_uV, %d -> %d\n",
+				 name, constraints->min_uV, min_uV);
 			constraints->min_uV = min_uV;
 		}
 		if (constraints->max_uV > max_uV) {
-			pr_debug("override '%s' %s, %d -> %d\n",
-				 name, "max_uV",
-				 constraints->max_uV, max_uV);
+			pr_debug("override '%s' max_uV, %d -> %d\n",
+				 name, constraints->max_uV, max_uV);
 			constraints->max_uV = max_uV;
 		}
 	}
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] regulator: Remove regulator core version announcement
  2010-11-22 13:51 [PATCH 1/2] regulator: Fix obfuscated log messages Mark Brown
@ 2010-11-22 13:51 ` Mark Brown
  2010-11-22 14:31 ` [PATCH 1/2] regulator: Fix obfuscated log messages Liam Girdwood
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2010-11-22 13:51 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: linux-kernel, patches, Mark Brown

The version hasn't been updated since the regulator API was merged in
2.6.27 so just remove it - now we're in mainline the kernel version is
much more useful.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/regulator/core.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index fe47860..64a56a7 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -32,8 +32,6 @@
 
 #include "dummy.h"
 
-#define REGULATOR_VERSION "0.5"
-
 static DEFINE_MUTEX(regulator_list_mutex);
 static LIST_HEAD(regulator_list);
 static LIST_HEAD(regulator_map_list);
@@ -2580,8 +2578,6 @@ static int __init regulator_init(void)
 {
 	int ret;
 
-	printk(KERN_INFO "regulator: core version %s\n", REGULATOR_VERSION);
-
 	ret = class_register(&regulator_class);
 
 	regulator_dummy_init();
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] regulator: Fix obfuscated log messages
  2010-11-22 13:51 [PATCH 1/2] regulator: Fix obfuscated log messages Mark Brown
  2010-11-22 13:51 ` [PATCH 2/2] regulator: Remove regulator core version announcement Mark Brown
@ 2010-11-22 14:31 ` Liam Girdwood
  1 sibling, 0 replies; 3+ messages in thread
From: Liam Girdwood @ 2010-11-22 14:31 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-kernel, patches

On Mon, 2010-11-22 at 13:51 +0000, Mark Brown wrote:
> Don't use %s to format fixed static strings into log messages, it just
> makes searching for and reading the message in the kernel source
> needlessly hard.

Both Applied.

Thanks

Liam
-- 
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-22 14:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-22 13:51 [PATCH 1/2] regulator: Fix obfuscated log messages Mark Brown
2010-11-22 13:51 ` [PATCH 2/2] regulator: Remove regulator core version announcement Mark Brown
2010-11-22 14:31 ` [PATCH 1/2] regulator: Fix obfuscated log messages Liam Girdwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox