* [PATCH] brcmfmac: Replace two seq_printf() calls in brcmf_feat_fwcap_debugfs_read()
@ 2019-07-02 9:50 Markus Elfring
2019-07-02 9:51 ` Arend Van Spriel
0 siblings, 1 reply; 2+ messages in thread
From: Markus Elfring @ 2019-07-02 9:50 UTC (permalink / raw)
To: netdev, linux-wireless, brcm80211-dev-list,
brcm80211-dev-list.pdl, Arend van Spriel, Chi-Hsien Lin,
David S. Miller, Franky Lin, Hante Meuleman, Kalle Valo,
Pieter-Paul Giesberts, Rafał Miłecki, Wright Feng
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 2 Jul 2019 11:31:07 +0200
A line break and a single string should be put into a sequence.
Thus use the corresponding output functions.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
index 73aff4e4039d..ec0e80296e43 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
@@ -225,10 +225,10 @@ static int brcmf_feat_fwcap_debugfs_read(struct seq_file *seq, void *data)
}
/* Usually there is a space at the end of capabilities string */
- seq_printf(seq, "%s", caps);
+ seq_puts(seq, caps);
/* So make sure we don't print two line breaks */
if (tmp > caps && *(tmp - 1) != '\n')
- seq_printf(seq, "\n");
+ seq_putc(seq, '\n');
return 0;
}
--
2.22.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] brcmfmac: Replace two seq_printf() calls in brcmf_feat_fwcap_debugfs_read()
2019-07-02 9:50 [PATCH] brcmfmac: Replace two seq_printf() calls in brcmf_feat_fwcap_debugfs_read() Markus Elfring
@ 2019-07-02 9:51 ` Arend Van Spriel
0 siblings, 0 replies; 2+ messages in thread
From: Arend Van Spriel @ 2019-07-02 9:51 UTC (permalink / raw)
To: Markus Elfring, netdev, linux-wireless, brcm80211-dev-list,
brcm80211-dev-list.pdl, Chi-Hsien Lin, David S. Miller,
Franky Lin, Hante Meuleman, Kalle Valo, Pieter-Paul Giesberts,
Rafał Miłecki, Wright Feng
Cc: LKML, kernel-janitors
On 7/2/2019 11:50 AM, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Tue, 2 Jul 2019 11:31:07 +0200
>
> A line break and a single string should be put into a sequence.
> Thus use the corresponding output functions.
>
> This issue was detected by using the Coccinelle software.
pot-ato, po-tato
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
> drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
> index 73aff4e4039d..ec0e80296e43 100644
> --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
> +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/feature.c
> @@ -225,10 +225,10 @@ static int brcmf_feat_fwcap_debugfs_read(struct seq_file *seq, void *data)
> }
>
> /* Usually there is a space at the end of capabilities string */
> - seq_printf(seq, "%s", caps);
> + seq_puts(seq, caps);
> /* So make sure we don't print two line breaks */
> if (tmp > caps && *(tmp - 1) != '\n')
> - seq_printf(seq, "\n");
> + seq_putc(seq, '\n');
>
> return 0;
> }
> --
> 2.22.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-02 9:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-02 9:50 [PATCH] brcmfmac: Replace two seq_printf() calls in brcmf_feat_fwcap_debugfs_read() Markus Elfring
2019-07-02 9:51 ` Arend Van Spriel
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).