Messages in this thread Patch in this message | | | Subject | [PATCH 1/4] net: stmmac: Combine three seq_printf() calls into a seq_puts() in stmmac_sysfs_dma_cap_read() | From | SF Markus Elfring <> | Date | Tue, 9 May 2017 13:52:54 +0200 |
| |
From: Markus Elfring <elfring@users.sourceforge.net> Date: Tue, 9 May 2017 13:10:28 +0200
A bit of text was put into a sequence by three separate function calls. Print the same data by a single function call instead.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index cd8c60132390..2949c9fc18fa 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3802,10 +3802,10 @@ static int stmmac_sysfs_dma_cap_read(struct seq_file *seq, void *v) return 0; } - seq_printf(seq, "==============================\n"); - seq_printf(seq, "\tDMA HW features\n"); - seq_printf(seq, "==============================\n"); - + seq_puts(seq, + "==============================\n" + "\tDMA HW features\n" + "==============================\n"); seq_printf(seq, "\t10/100 Mbps: %s\n", (priv->dma_cap.mbps_10_100) ? "Y" : "N"); seq_printf(seq, "\t1000 Mbps: %s\n", -- 2.12.2
| |