Skip to contentSkip to conversation

ocfs2: Combine two seq_printf() calls into one call in ocfs2_dlm_seq_show()

PATCH New SF Markus Elfring 1 participant 1 message Jan 13, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ocfs2: Combine two seq_printf() calls into one call in ocfs2_dlm_seq_show()

From: Markus Elfring <[email protected]>
Date: Sat, 13 Jan 2018 16:36:51 +0100

Some data were printed into a sequence by two separate function calls. Print almost the same data by a single function call instead. (Omit a tab character at the line end within a format string.)

This issue was detected by using the Coccinelle software.

---
 fs/ocfs2/dlmglue.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
fs/ocfs2/dlmglue.c +1 -4
index e4b9085a657a..909b4a339c80 100644
@@ -3104,7 +3104,7 @@ static int ocfs2_dlm_seq_show(struct seq_file *m, void *v)
 		   "%llu\t"
 		   "%u\t"
 		   "%u\t"
-		   "%u\t",
+		   "%u\n",
 		   lock_num_prmode(lockres),
 		   lock_num_exmode(lockres),
 		   lock_num_prmode_failed(lockres),
@@ -3114,9 +3114,6 @@ static int ocfs2_dlm_seq_show(struct seq_file *m, void *v)
 		   lock_max_prmode(lockres),
 		   lock_max_exmode(lockres),
 		   lock_refresh(lockres));
-
-	/* End the line */
-	seq_printf(m, "\n");
 	return 0;
 }
 
Signature · 1 line
2.15.1