[<prev] [next>] [day] [month] [year] [list]
Message-ID: <38ae4f27-177d-40c3-a16f-c8bd286df13d@web.de>
Date: Mon, 15 Jul 2024 14:16:57 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: linux-wireless@...r.kernel.org, kernel-janitors@...r.kernel.org,
Christophe Jaillet <christophe.jaillet@...adoo.fr>,
Kalle Valo <kvalo@...nel.org>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] wil6210: Replace 8 seq_printf() calls by seq_putc() calls
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Mon, 15 Jul 2024 14:09:01 +0200
Single characters should be put into a sequence.
Thus use the corresponding function “seq_putc” for eight selected calls.
This issue was transformed by using the Coccinelle software.
Suggested-by: Christophe Jaillet <christophe.jaillet@...adoo.fr>
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/net/wireless/ath/wil6210/debugfs.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/net/wireless/ath/wil6210/debugfs.c b/drivers/net/wireless/ath/wil6210/debugfs.c
index c021ebcddee7..6e16936631d5 100644
--- a/drivers/net/wireless/ath/wil6210/debugfs.c
+++ b/drivers/net/wireless/ath/wil6210/debugfs.c
@@ -55,7 +55,7 @@ static void wil_print_desc_edma(struct seq_file *s, struct wil6210_priv *wil,
if (wil->rx_buff_mgmt.buff_arr &&
wil_val_in_range(buff_id, 0, wil->rx_buff_mgmt.size))
has_skb = wil->rx_buff_mgmt.buff_arr[buff_id].skb;
- seq_printf(s, "%c", (has_skb) ? _h : _s);
+ seq_putc(s, (has_skb) ? _h : _s);
} else {
struct wil_tx_enhanced_desc *d =
(struct wil_tx_enhanced_desc *)
@@ -64,10 +64,10 @@ static void wil_print_desc_edma(struct seq_file *s, struct wil6210_priv *wil,
num_of_descs = (u8)d->mac.d[2];
has_skb = ring->ctx && ring->ctx[idx].skb;
if (num_of_descs >= 1)
- seq_printf(s, "%c", has_skb ? _h : _s);
+ seq_putc(s, has_skb ? _h : _s);
else
/* num_of_descs == 0, it's a frag in a list of descs */
- seq_printf(s, "%c", has_skb ? 'h' : _s);
+ seq_putc(s, has_skb ? 'h' : _s);
}
}
@@ -120,7 +120,7 @@ static void wil_print_ring(struct seq_file *s, struct wil6210_priv *wil,
} else {
volatile struct vring_tx_desc *d =
&ring->va[i].tx.legacy;
- seq_printf(s, "%c", (d->dma.status & BIT(0)) ?
+ seq_putc(s, (d->dma.status & BIT(0)) ?
_s : (ring->ctx[i].skb ? _h : 'h'));
}
}
@@ -237,10 +237,10 @@ static void wil_print_sring(struct seq_file *s, struct wil6210_priv *wil,
if ((i % 128) == 0 && i != 0)
seq_puts(s, "\n");
if (i == sring->swhead)
- seq_printf(s, "%c", (*sdword_0 & BIT(31)) ?
+ seq_putc(s, (*sdword_0 & BIT(31)) ?
'X' : 'x');
else
- seq_printf(s, "%c", (*sdword_0 & BIT(31)) ?
+ seq_putc(s, (*sdword_0 & BIT(31)) ?
'1' : '0');
}
seq_puts(s, "\n");
@@ -1556,9 +1556,9 @@ static void wil_print_rxtid(struct seq_file *s, struct wil_tid_ampdu_rx *r)
seq_printf(s, "([%2d]) 0x%03x [", r->buf_size, r->head_seq_num);
for (i = 0; i < r->buf_size; i++) {
if (i == index)
- seq_printf(s, "%c", r->reorder_buf[i] ? 'O' : '|');
+ seq_putc(s, r->reorder_buf[i] ? 'O' : '|');
else
- seq_printf(s, "%c", r->reorder_buf[i] ? '*' : '_');
+ seq_putc(s, r->reorder_buf[i] ? '*' : '_');
}
seq_printf(s,
"] total %llu drop %llu (dup %llu + old %llu + dup mcast %llu) last 0x%03x\n",
--
2.45.2
Powered by blists - more mailing lists