lkml.org 
[lkml]   [2017]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 2/4] net: stmmac: Replace five seq_printf() calls by seq_puts()
From
Date
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 9 May 2017 13:20:03 +0200

Five strings which did not contain data format specifications should be put
into a sequence. Thus use the corresponding function "seq_puts".

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 | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 2949c9fc18fa..1f7022ce78b7 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -3748,11 +3748,11 @@ static int stmmac_sysfs_ring_read(struct seq_file *seq, void *v)
seq_printf(seq, "RX Queue %d:\n", queue);

if (priv->extend_desc) {
- seq_printf(seq, "Extended descriptor ring:\n");
+ seq_puts(seq, "Extended descriptor ring:\n");
sysfs_display_ring((void *)rx_q->dma_erx,
DMA_RX_SIZE, 1, seq);
} else {
- seq_printf(seq, "Descriptor ring:\n");
+ seq_puts(seq, "Descriptor ring:\n");
sysfs_display_ring((void *)rx_q->dma_rx,
DMA_RX_SIZE, 0, seq);
}
@@ -3764,11 +3764,11 @@ static int stmmac_sysfs_ring_read(struct seq_file *seq, void *v)
seq_printf(seq, "TX Queue %d:\n", queue);

if (priv->extend_desc) {
- seq_printf(seq, "Extended descriptor ring:\n");
+ seq_puts(seq, "Extended descriptor ring:\n");
sysfs_display_ring((void *)tx_q->dma_etx,
DMA_TX_SIZE, 1, seq);
} else {
- seq_printf(seq, "Descriptor ring:\n");
+ seq_puts(seq, "Descriptor ring:\n");
sysfs_display_ring((void *)tx_q->dma_tx,
DMA_TX_SIZE, 0, seq);
}
@@ -3798,7 +3798,7 @@ static int stmmac_sysfs_dma_cap_read(struct seq_file *seq, void *v)
struct stmmac_priv *priv = netdev_priv(dev);

if (!priv->hw_cap_support) {
- seq_printf(seq, "DMA HW features not supported\n");
+ seq_puts(seq, "DMA HW features not supported\n");
return 0;
}

--
2.12.2
\
 
 \ /
  Last update: 2017-05-10 21:18    [W:0.050 / U:4.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site