From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-mtd@lists.infradead.org,
Boris Brezillon <boris.brezillon@free-electrons.com>,
Brian Norris <computersforpeace@gmail.com>,
Cyrille Pitchen <cyrille.pitchen@wedev4u.fr>,
David Woodhouse <dwmw2@infradead.org>,
Marek Vasut <marek.vasut@gmail.com>,
Richard Weinberger <richard@nod.at>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH 1/3] mtdswap: Reduce function calls for sequence output in mtdswap_show()
Date: Mon, 8 May 2017 17:08:04 +0200 [thread overview]
Message-ID: <a46e0d93-8708-2f1d-2e16-980216415681@users.sourceforge.net> (raw)
In-Reply-To: <82e905b5-3958-be81-b0ee-d0a2805154df@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 8 May 2017 16:02:34 +0200
Two line breaks were put into a sequence by separate function calls.
Print the same data together with adjusted seq_printf() calls instead.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/mtd/mtdswap.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/mtd/mtdswap.c b/drivers/mtd/mtdswap.c
index f12879a3d4ff..0805f45c5139 100644
--- a/drivers/mtd/mtdswap.c
+++ b/drivers/mtd/mtdswap.c
@@ -1283,19 +1283,14 @@ static int mtdswap_show(struct seq_file *s, void *data)
"erased %u times\n",
cwp, d->pages_per_eblk - cwp, cwecount);
- seq_printf(s, "total erasures: %lu\n", sum);
-
- seq_puts(s, "\n");
-
+ seq_printf(s, "total erasures: %lu\n\n", sum);
seq_printf(s, "mtdswap_readsect count: %llu\n", d->sect_read_count);
seq_printf(s, "mtdswap_writesect count: %llu\n", d->sect_write_count);
seq_printf(s, "mtdswap_discard count: %llu\n", d->discard_count);
seq_printf(s, "mtd read count: %llu\n", d->mtd_read_count);
seq_printf(s, "mtd write count: %llu\n", d->mtd_write_count);
seq_printf(s, "discarded pages count: %llu\n", d->discard_page_count);
-
- seq_puts(s, "\n");
- seq_printf(s, "total pages: %u\n", pages);
+ seq_printf(s, "\ntotal pages: %u\n", pages);
seq_printf(s, "pages mapped: %u\n", mapped);
return 0;
--
2.12.2
next prev parent reply other threads:[~2017-05-08 15:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-08 15:07 [PATCH 0/3] mtdswap: Fine-tuning for three function implementations SF Markus Elfring
2017-05-08 15:08 ` SF Markus Elfring [this message]
2017-05-08 15:09 ` [PATCH 2/3] mtdswap: Improve two size determinations in mtdswap_add_mtd() SF Markus Elfring
2017-05-08 15:10 ` [PATCH 3/3] mtdswap: Improve a size determination in mtdswap_erase_block() SF Markus Elfring
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=a46e0d93-8708-2f1d-2e16-980216415681@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=boris.brezillon@free-electrons.com \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@wedev4u.fr \
--cc=dwmw2@infradead.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=richard@nod.at \
/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
all inboxes | Powered by JetHome®