Commit 82a52f8e authored by Mathias Rav's avatar Mathias Rav Committed by Greg Kroah-Hartman

staging: lustre: lprocfs: Use seq_puts instead of seq_printf

Reported by checkpatch.pl: "WARNING: Prefer seq_puts to seq_printf".
Signed-off-by: default avatarMathias Rav <mathiasrav@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8b230932
...@@ -702,7 +702,7 @@ static int obd_import_flags2str(struct obd_import *imp, struct seq_file *m) ...@@ -702,7 +702,7 @@ static int obd_import_flags2str(struct obd_import *imp, struct seq_file *m)
bool first = true; bool first = true;
if (imp->imp_obd->obd_no_recov) { if (imp->imp_obd->obd_no_recov) {
seq_printf(m, "no_recov"); seq_puts(m, "no_recov");
first = false; first = false;
} }
...@@ -768,15 +768,15 @@ int lprocfs_rd_import(struct seq_file *m, void *data) ...@@ -768,15 +768,15 @@ int lprocfs_rd_import(struct seq_file *m, void *data)
imp->imp_connect_data.ocd_instance); imp->imp_connect_data.ocd_instance);
obd_connect_seq_flags2str(m, imp->imp_connect_data.ocd_connect_flags, obd_connect_seq_flags2str(m, imp->imp_connect_data.ocd_connect_flags,
", "); ", ");
seq_printf(m, " ]\n"); seq_puts(m, " ]\n");
obd_connect_data_seqprint(m, ocd); obd_connect_data_seqprint(m, ocd);
seq_printf(m, " import_flags: [ "); seq_puts(m, " import_flags: [ ");
obd_import_flags2str(imp, m); obd_import_flags2str(imp, m);
seq_printf(m, seq_puts(m,
" ]\n" " ]\n"
" connection:\n" " connection:\n"
" failover_nids: [ "); " failover_nids: [ ");
spin_lock(&imp->imp_lock); spin_lock(&imp->imp_lock);
j = 0; j = 0;
list_for_each_entry(conn, &imp->imp_conn_list, oic_item) { list_for_each_entry(conn, &imp->imp_conn_list, oic_item) {
...@@ -909,7 +909,7 @@ int lprocfs_rd_state(struct seq_file *m, void *data) ...@@ -909,7 +909,7 @@ int lprocfs_rd_state(struct seq_file *m, void *data)
seq_printf(m, "current_state: %s\n", seq_printf(m, "current_state: %s\n",
ptlrpc_import_state_name(imp->imp_state)); ptlrpc_import_state_name(imp->imp_state));
seq_printf(m, "state_history:\n"); seq_puts(m, "state_history:\n");
k = imp->imp_state_hist_idx; k = imp->imp_state_hist_idx;
for (j = 0; j < IMP_STATE_HIST_LEN; j++) { for (j = 0; j < IMP_STATE_HIST_LEN; j++) {
struct import_state_hist *ish = struct import_state_hist *ish =
...@@ -931,7 +931,7 @@ int lprocfs_at_hist_helper(struct seq_file *m, struct adaptive_timeout *at) ...@@ -931,7 +931,7 @@ int lprocfs_at_hist_helper(struct seq_file *m, struct adaptive_timeout *at)
for (i = 0; i < AT_BINS; i++) for (i = 0; i < AT_BINS; i++)
seq_printf(m, "%3u ", at->at_hist[i]); seq_printf(m, "%3u ", at->at_hist[i]);
seq_printf(m, "\n"); seq_puts(m, "\n");
return 0; return 0;
} }
EXPORT_SYMBOL(lprocfs_at_hist_helper); EXPORT_SYMBOL(lprocfs_at_hist_helper);
...@@ -999,7 +999,7 @@ int lprocfs_rd_connect_flags(struct seq_file *m, void *data) ...@@ -999,7 +999,7 @@ int lprocfs_rd_connect_flags(struct seq_file *m, void *data)
flags = obd->u.cli.cl_import->imp_connect_data.ocd_connect_flags; flags = obd->u.cli.cl_import->imp_connect_data.ocd_connect_flags;
seq_printf(m, "flags=%#llx\n", flags); seq_printf(m, "flags=%#llx\n", flags);
obd_connect_seq_flags2str(m, flags, "\n"); obd_connect_seq_flags2str(m, flags, "\n");
seq_printf(m, "\n"); seq_puts(m, "\n");
up_read(&obd->u.cli.cl_sem); up_read(&obd->u.cli.cl_sem);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment