From: SF Markus Elfring Date: Mon, 08 May 2017 15:08:04 +0000 Subject: [PATCH 1/3] mtdswap: Reduce function calls for sequence output in mtdswap_show() Message-Id: List-Id: References: <82e905b5-3958-be81-b0ee-d0a2805154df@users.sourceforge.net> In-Reply-To: <82e905b5-3958-be81-b0ee-d0a2805154df@users.sourceforge.net> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-mtd@lists.infradead.org, Boris Brezillon , Brian Norris , Cyrille Pitchen , David Woodhouse , Marek Vasut , Richard Weinberger Cc: LKML , kernel-janitors@vger.kernel.org From: Markus Elfring 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 --- 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