From: Markus Elfring <Markus.Elfring@web.de>
To: linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org,
Christophe Jaillet <christophe.jaillet@wanadoo.fr>,
Kalle Valo <kvalo@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] wil6210: Replace 8 seq_printf() calls by seq_putc() calls
Date: Mon, 15 Jul 2024 14:16:57 +0200 [thread overview]
Message-ID: <38ae4f27-177d-40c3-a16f-c8bd286df13d@web.de> (raw)
From: Markus Elfring <elfring@users.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@wanadoo.fr>
Signed-off-by: Markus Elfring <elfring@users.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
reply other threads:[~2024-07-15 12:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=38ae4f27-177d-40c3-a16f-c8bd286df13d@web.de \
--to=markus.elfring@web.de \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
/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