From: SF Markus Elfring <elfring@users.sourceforge.net>
To: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
Philippe Reynes <tremyfr@gmail.com>,
Stefan Wahren <stefan.wahren@i2se.com>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH] qca_debug: Reduce function calls for sequence output in qcaspi_info_show()
Date: Mon, 8 May 2017 19:29:12 +0200 [thread overview]
Message-ID: <9932ee63-f766-49ce-d760-9a0bd06f0657@users.sourceforge.net> (raw)
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 8 May 2017 19:21:27 +0200
A bit of data was 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/net/ethernet/qualcomm/qca_debug.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/qualcomm/qca_debug.c b/drivers/net/ethernet/qualcomm/qca_debug.c
index d145df98feff..27b5c1dd27d0 100644
--- a/drivers/net/ethernet/qualcomm/qca_debug.c
+++ b/drivers/net/ethernet/qualcomm/qca_debug.c
@@ -81,11 +81,7 @@ qcaspi_info_show(struct seq_file *s, void *what)
else
seq_puts(s, "in use");
- seq_puts(s, "\n");
-
- seq_printf(s, "TX ring size : %u\n",
- qca->txr.size);
-
+ seq_printf(s, "\nTX ring size : %u\n", qca->txr.size);
seq_printf(s, "Sync state : %u (",
(unsigned int)qca->sync);
switch (qca->sync) {
@@ -102,10 +98,8 @@ qcaspi_info_show(struct seq_file *s, void *what)
seq_puts(s, "INVALID");
break;
}
- seq_puts(s, ")\n");
- seq_printf(s, "IRQ : %d\n",
- qca->spi_dev->irq);
+ seq_printf(s, ")\nIRQ : %d\n", qca->spi_dev->irq);
seq_printf(s, "INTR REQ : %u\n",
qca->intr_req);
seq_printf(s, "INTR SVC : %u\n",
--
2.12.2
next reply other threads:[~2017-05-08 17:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-08 17:29 SF Markus Elfring [this message]
2017-05-09 7:07 ` [PATCH] qca_debug: Reduce function calls for sequence output in qcaspi_info_show() Stefan Wahren
2017-05-09 7:57 ` 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=9932ee63-f766-49ce-d760-9a0bd06f0657@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=davem@davemloft.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stefan.wahren@i2se.com \
--cc=tremyfr@gmail.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;
as well as URLs for NNTP newsgroup(s).