From: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
To: linuxppc-dev@lists.ozlabs.org
Subject: [PATCH V4 3/3] powerpc/powernv: Have uniform logging of errors in opal-elog.c
Date: Tue, 04 Feb 2014 01:00:08 +0530 [thread overview]
Message-ID: <20140203193000.7790.55563.stgit@deepthi> (raw)
In-Reply-To: <20140203192915.7790.20325.stgit@deepthi>
Currently some errors/info to be reported use
printk and the rest pr_fmt(). This patch
makes the complete error logging uniform.
Signed-off-by: Deepthi Dharwar <deepthi@linux.vnet.ibm.com>
---
arch/powerpc/platforms/powernv/opal-elog.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/platforms/powernv/opal-elog.c b/arch/powerpc/platforms/powernv/opal-elog.c
index 13874b1..d7a3e68 100644
--- a/arch/powerpc/platforms/powernv/opal-elog.c
+++ b/arch/powerpc/platforms/powernv/opal-elog.c
@@ -63,7 +63,7 @@ void opal_elog_ack(uint64_t ack_id)
struct opal_err_log *record, *next;
bool found = false;
- printk(KERN_INFO "OPAL Log ACK=%llx", ack_id);
+ pr_info("OPAL Log ACK=%llx", ack_id);
/* once user acknowledge a log delete record from list */
spin_lock_irqsave(&opal_elog_lock, flags);
@@ -189,7 +189,7 @@ static void opal_elog_read(void)
/* read log size and log ID from OPAL */
rc = opal_get_elog_size(&log_id, &elog_size, &elog_type);
if (rc != OPAL_SUCCESS) {
- pr_err("ELOG: Opal log read failed\n");
+ pr_err("Opal log read failed\n");
return;
}
if (elog_size >= OPAL_MAX_ERRLOG_SIZE)
@@ -203,7 +203,7 @@ static void opal_elog_read(void)
rc = opal_read_elog(__pa(err_log_data), elog_size, log_id);
if (rc != OPAL_SUCCESS) {
mutex_unlock(&err_log_data_mutex);
- pr_err("ELOG: log read failed for log-id=%llx\n", log_id);
+ pr_err("Reading of log failed for log-id=%llx\n", log_id);
/* put back the free node. */
spin_lock_irqsave(&opal_elog_lock, flags);
list_add(&record->link, &elog_ack_list);
@@ -265,7 +265,7 @@ static int init_err_log_buffer(void)
buf_ptr = vmalloc(sizeof(struct opal_err_log) * MAX_NUM_RECORD);
if (!buf_ptr) {
- printk(KERN_ERR "ELOG: failed to allocate memory.\n");
+ pr_err("Failed to allocate memory for error logging buffers.\n");
return -ENOMEM;
}
memset(buf_ptr, 0, sizeof(struct opal_err_log) * MAX_NUM_RECORD);
@@ -358,15 +358,13 @@ int __init opal_elog_init(void)
rc = sysfs_create_bin_file(opal_kobj, &opal_elog_attr);
if (rc) {
- printk(KERN_ERR "ELOG: unable to create sysfs file"
- "opal_elog (%d)\n", rc);
+ pr_err("Unable to create sysfs file opal_elog (%d)\n", rc);
return rc;
}
rc = sysfs_create_file(opal_kobj, &opal_elog_ack_attr.attr);
if (rc) {
- printk(KERN_ERR "ELOG: unable to create sysfs file"
- " opal_elog_ack (%d)\n", rc);
+ pr_err("Unable to create sysfs file opal_elog_ack (%d)\n", rc);
return rc;
}
prev parent reply other threads:[~2014-02-03 19:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-03 19:29 [PATCH V4 0/3] powerpc/powernv: Error logging interfaces Deepthi Dharwar
2014-02-03 19:29 ` [PATCH V4 1/3] powerpc/powernv: Push critical error logs to FSP Deepthi Dharwar
2014-02-03 19:29 ` [PATCH V4 2/3] powerpc/powernv: Correct spell error in opal-elog.c Deepthi Dharwar
2014-02-03 19:30 ` Deepthi Dharwar [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=20140203193000.7790.55563.stgit@deepthi \
--to=deepthi@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.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).