From 4ad089d542373aab71f59df58ee110d3df02ae8a Mon Sep 17 00:00:00 2001
From: Ting-Chih Hsiao <s894330(a)hotmail.com>
Date: Thu, 30 Jul 2015 16:22:16 +0800
Subject: [PATCH] staging: lustre: fix coding style problem.
Signed-off-by: Ting-Chih Hsiao <s894330(a)hotmail.com>
---
.../lustre/lustre/libcfs/linux/linux-tracefile.c | 30 ++++++++++------------
1 file changed, 13 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c
b/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c
index eb10e3b..2c6ce86 100644
--- a/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c
+++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c
@@ -90,7 +90,7 @@ int cfs_tracefile_init_arch(void)
out:
cfs_tracefile_fini_arch();
- printk(KERN_ERR "lnet: Not enough memory\n");
+ pr_err("lnet: Not enough memory\n");
return -ENOMEM;
}
@@ -205,19 +205,17 @@ cfs_set_ptldebug_header(struct ptldebug_header *header,
header->ph_pid = current->pid;
header->ph_line_num = msgdata->msg_line;
header->ph_extern_pid = 0;
- return;
}
static char *
dbghdr_to_err_string(struct ptldebug_header *hdr)
{
switch (hdr->ph_subsys) {
-
- case S_LND:
- case S_LNET:
- return "LNetError";
- default:
- return "LustreError";
+ case S_LND:
+ case S_LNET:
+ return "LNetError";
+ default:
+ return "LustreError";
}
}
@@ -225,12 +223,11 @@ static char *
dbghdr_to_info_string(struct ptldebug_header *hdr)
{
switch (hdr->ph_subsys) {
-
- case S_LND:
- case S_LNET:
- return "LNet";
- default:
- return "Lustre";
+ case S_LND:
+ case S_LNET:
+ return "LNet";
+ default:
+ return "Lustre";
}
}
@@ -255,13 +252,12 @@ void cfs_print_to_console(struct ptldebug_header *hdr, int mask,
}
if ((mask & D_CONSOLE) != 0) {
- printk("%s%s: %.*s", ptype, prefix, len, buf);
+ pr_info("%s%s: %.*s", ptype, prefix, len, buf);
} else {
- printk("%s%s: %d:%d:(%s:%d:%s()) %.*s", ptype, prefix,
+ pr_info("%s%s: %d:%d:(%s:%d:%s()) %.*s", ptype, prefix,
hdr->ph_pid, hdr->ph_extern_pid, file, hdr->ph_line_num,
fn, len, buf);
}
- return;
}
int cfs_trace_max_debug_mb(void)
--
1.9.1
Show replies by thread