From: Joe Perches <joe@perches.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Len Brown <len.brown@intel.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 4/4] thermal_sys: Convert printks to pr_<level>
Date: Tue, 24 Jan 2012 15:35:38 -0800 [thread overview]
Message-ID: <1c7ffad305f38ef390800244bef69ffab62f25f8.1327447797.git.joe@perches.com> (raw)
In-Reply-To: <cover.1327447797.git.joe@perches.com>
Use the current logging style.
Remove PREFIX, add pr_fmt, convert the printks.
All dmesg output now prefixed with "thermal_sys: ".
Signed-off-by: Joe Perches <joe@perches.com>
---
drivers/thermal/thermal_sys.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c
index 68df616..9c69d8a 100644
--- a/drivers/thermal/thermal_sys.c
+++ b/drivers/thermal/thermal_sys.c
@@ -23,6 +23,8 @@
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/module.h>
#include <linux/device.h>
#include <linux/err.h>
@@ -39,8 +41,6 @@ MODULE_AUTHOR("Zhang Rui");
MODULE_DESCRIPTION("Generic thermal management sysfs support");
MODULE_LICENSE("GPL");
-#define PREFIX "Thermal: "
-
struct thermal_cooling_device_instance {
int id;
char name[THERMAL_NAME_LENGTH];
@@ -1025,8 +1025,7 @@ void thermal_zone_device_update(struct thermal_zone_device *tz)
if (tz->ops->get_temp(tz, &temp)) {
/* get_temp failed - retry it later */
- printk(KERN_WARNING PREFIX "failed to read out thermal zone "
- "%d\n", tz->id);
+ pr_warn("failed to read out thermal zone %d\n", tz->id);
goto leave;
}
@@ -1041,9 +1040,8 @@ void thermal_zone_device_update(struct thermal_zone_device *tz)
ret = tz->ops->notify(tz, count,
trip_type);
if (!ret) {
- printk(KERN_EMERG
- "Critical temperature reached (%ld C), shutting down.\n",
- temp/1000);
+ pr_emerg("Critical temperature reached (%ld C), shutting down\n",
+ temp/1000);
orderly_poweroff(true);
}
}
@@ -1346,7 +1344,7 @@ int generate_netlink_event(u32 orig, enum events event)
result = genlmsg_multicast(skb, 0, thermal_event_mcgrp.id, GFP_ATOMIC);
if (result)
- printk(KERN_INFO "failed to send netlink event:%d", result);
+ pr_info("failed to send netlink event:%d\n", result);
return result;
}
--
1.7.8.111.gad25c.dirty
prev parent reply other threads:[~2012-01-24 23:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-24 23:35 [PATCH 0/4] thermal_sys: Cleanups Joe Perches
2012-01-24 23:35 ` [PATCH 1/4] thermal_sys: Remove unnecessary line continuations Joe Perches
2012-01-24 23:41 ` Jesper Juhl
2012-01-24 23:35 ` [PATCH 2/4] thermal_sys: Remove obfuscating used-once macros Joe Perches
2012-01-26 23:31 ` Andrew Morton
2012-01-24 23:35 ` [PATCH 3/4] thermal_sys: Kernel style cleanups Joe Perches
2012-01-24 23:39 ` Jesper Juhl
2012-01-24 23:35 ` Joe Perches [this message]
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=1c7ffad305f38ef390800244bef69ffab62f25f8.1327447797.git.joe@perches.com \
--to=joe@perches.com \
--cc=akpm@linux-foundation.org \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).