mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: SF Markus Elfring <elfring@users.sourceforge.net>
To: ocfs2-devel@oss.oracle.com, Joel Becker <jlbec@evilplan.org>,
	Mark Fasheh <mfasheh@versity.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH] ocfs2: Combine two seq_printf() calls into one call in ocfs2_dlm_seq_show()
Date: Sat, 13 Jan 2018 16:46:28 +0100	[thread overview]
Message-ID: <441d5e20-ea32-cfe8-bb1e-794d94c85be7@users.sourceforge.net> (raw)

From: Markus Elfring <elfring@users.sourceforge.net>
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.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 fs/ocfs2/dlmglue.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c
index e4b9085a657a..909b4a339c80 100644
--- a/fs/ocfs2/dlmglue.c
+++ b/fs/ocfs2/dlmglue.c
@@ -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;
 }
 
-- 
2.15.1

                 reply	other threads:[~2018-01-13 15:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=441d5e20-ea32-cfe8-bb1e-794d94c85be7@users.sourceforge.net \
    --to=elfring@users.sourceforge.net \
    --cc=jlbec@evilplan.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfasheh@versity.com \
    --cc=ocfs2-devel@oss.oracle.com \
    /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

Powered by JetHome