[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a46e0d93-8708-2f1d-2e16-980216415681@users.sourceforge.net>
Date: Mon, 8 May 2017 17:08:04 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-mtd@...ts.infradead.org,
Boris Brezillon <boris.brezillon@...e-electrons.com>,
Brian Norris <computersforpeace@...il.com>,
Cyrille Pitchen <cyrille.pitchen@...ev4u.fr>,
David Woodhouse <dwmw2@...radead.org>,
Marek Vasut <marek.vasut@...il.com>,
Richard Weinberger <richard@....at>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 1/3] mtdswap: Reduce function calls for sequence output in
mtdswap_show()
From: Markus Elfring <elfring@...rs.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@...rs.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
Powered by blists - more mailing lists