public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Walker <dwalker@codeaurora.org>
To: Liam Girdwood <lrg@slimlogic.co.uk>,
	Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-kernel@vger.kernel.org,
	Daniel Walker <dwalker@codeaurora.org>,
	bleong@codeaurora.org
Subject: [PATCH 1/2] drivers: regulator: core: use pr_fmt
Date: Wed, 17 Nov 2010 15:30:27 -0800	[thread overview]
Message-ID: <1290036628-9928-1-git-send-email-dwalker@codeaurora.org> (raw)

This adds a pr_fmt line which uses the __func__ macro. I also
convert the current pr_ lines to remove their __func__ usage.

Cc: bleong@codeaurora.org
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
---
 drivers/regulator/core.c |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index f1d10c9..a3ca3d6 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -13,6 +13,8 @@
  *
  */
 
+#define pr_fmt(fmt) "%s:" fmt, __func__
+
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/device.h>
@@ -765,8 +767,8 @@ 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 '%s' voltage constraints\n",
-				       __func__, "invalid", name);
+			pr_err("%s '%s' voltage constraints\n", "invalid",
+				name);
 			return -EINVAL;
 		}
 
@@ -787,22 +789,22 @@ 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 '%s' voltage constraints\n",
-				       __func__, "unsupportable", name);
+			pr_err("%s '%s' voltage constraints\n", "unsupportable",
+				name);
 			return -EINVAL;
 		}
 
 		/* use regulator's subset of machine constraints */
 		if (constraints->min_uV < min_uV) {
-			pr_debug("%s: override '%s' %s, %d -> %d\n",
-				       __func__, name, "min_uV",
-					constraints->min_uV, min_uV);
+			pr_debug("override '%s' %s, %d -> %d\n",
+				 name, "min_uV",
+				 constraints->min_uV, min_uV);
 			constraints->min_uV = min_uV;
 		}
 		if (constraints->max_uV > max_uV) {
-			pr_debug("%s: override '%s' %s, %d -> %d\n",
-				       __func__, name, "max_uV",
-					constraints->max_uV, max_uV);
+			pr_debug("override '%s' %s, %d -> %d\n",
+				 name, "max_uV",
+				 constraints->max_uV, max_uV);
 			constraints->max_uV = max_uV;
 		}
 	}
-- 
1.7.1


             reply	other threads:[~2010-11-17 23:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-17 23:30 Daniel Walker [this message]
2010-11-17 23:30 ` [PATCH 2/2] drivers: regulator: core: convert to using pr_ macros Daniel Walker
2010-11-18  0:36   ` Joe Perches
2010-11-18  1:30     ` Joe Perches
2010-11-18 13:30       ` Mark Brown
2010-11-18 13:29     ` Mark Brown
2010-11-18 16:29       ` Joe Perches
2010-11-18  0:29 ` [PATCH 1/2] drivers: regulator: core: use pr_fmt Joe Perches
2010-11-18  0:35   ` Daniel Walker
2010-11-18 10:37     ` Mark Brown
2010-11-18 16:44       ` Joe Perches
2010-11-18 10:35 ` Mark Brown
2010-11-19 11:09   ` Liam Girdwood
2010-11-19 17:07     ` Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1290036628-9928-1-git-send-email-dwalker@codeaurora.org \
    --to=dwalker@codeaurora.org \
    --cc=bleong@codeaurora.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@slimlogic.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox