* [PATCH] bpf: Replace a seq_printf() call by seq_puts() in btf_enum_seq_show()
@ 2019-07-02 17:13 Markus Elfring
2019-07-02 18:02 ` Yonghong Song
2019-07-03 10:09 ` Daniel Borkmann
0 siblings, 2 replies; 4+ messages in thread
From: Markus Elfring @ 2019-07-02 17:13 UTC (permalink / raw)
To: bpf, netdev, Alexei Starovoitov, Daniel Borkmann,
Martin KaFai Lau, Song Liu, Yonghong Song
Cc: LKML, kernel-janitors
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Tue, 2 Jul 2019 19:04:08 +0200
A string which did not contain a data format specification 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>
---
kernel/bpf/btf.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index 546ebee39e2a..679a19968f29 100644
--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -2426,9 +2426,8 @@ static void btf_enum_seq_show(const struct btf *btf, const struct btf_type *t,
for (i = 0; i < nr_enums; i++) {
if (v == enums[i].val) {
- seq_printf(m, "%s",
- __btf_name_by_offset(btf,
- enums[i].name_off));
+ seq_puts(m,
+ __btf_name_by_offset(btf, enums[i].name_off));
return;
}
}
--
2.22.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] bpf: Replace a seq_printf() call by seq_puts() in btf_enum_seq_show()
2019-07-02 17:13 [PATCH] bpf: Replace a seq_printf() call by seq_puts() in btf_enum_seq_show() Markus Elfring
@ 2019-07-02 18:02 ` Yonghong Song
2019-07-03 10:09 ` Daniel Borkmann
1 sibling, 0 replies; 4+ messages in thread
From: Yonghong Song @ 2019-07-02 18:02 UTC (permalink / raw)
To: Markus Elfring, bpf, netdev, Alexei Starovoitov, Daniel Borkmann,
Martin Lau, Song Liu
Cc: LKML, kernel-janitors
On 7/2/19 10:13 AM, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Tue, 2 Jul 2019 19:04:08 +0200
>
> A string which did not contain a data format specification 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>
Acked-by: Yonghong Song <yhs@fb.com>
> ---
> kernel/bpf/btf.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
> index 546ebee39e2a..679a19968f29 100644
> --- a/kernel/bpf/btf.c
> +++ b/kernel/bpf/btf.c
> @@ -2426,9 +2426,8 @@ static void btf_enum_seq_show(const struct btf *btf, const struct btf_type *t,
>
> for (i = 0; i < nr_enums; i++) {
> if (v == enums[i].val) {
> - seq_printf(m, "%s",
> - __btf_name_by_offset(btf,
> - enums[i].name_off));
> + seq_puts(m,
> + __btf_name_by_offset(btf, enums[i].name_off));
> return;
> }
> }
> --
> 2.22.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bpf: Replace a seq_printf() call by seq_puts() in btf_enum_seq_show()
2019-07-02 17:13 [PATCH] bpf: Replace a seq_printf() call by seq_puts() in btf_enum_seq_show() Markus Elfring
2019-07-02 18:02 ` Yonghong Song
@ 2019-07-03 10:09 ` Daniel Borkmann
2019-07-03 10:43 ` Greg KH
1 sibling, 1 reply; 4+ messages in thread
From: Daniel Borkmann @ 2019-07-03 10:09 UTC (permalink / raw)
To: Markus Elfring, bpf, netdev, Alexei Starovoitov,
Martin KaFai Lau, Song Liu, Yonghong Song
Cc: LKML, kernel-janitors
On 07/02/2019 07:13 PM, Markus Elfring wrote:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Tue, 2 Jul 2019 19:04:08 +0200
>
> A string which did not contain a data format specification 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>
The code is fine as is, I'm not applying this.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bpf: Replace a seq_printf() call by seq_puts() in btf_enum_seq_show()
2019-07-03 10:09 ` Daniel Borkmann
@ 2019-07-03 10:43 ` Greg KH
0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2019-07-03 10:43 UTC (permalink / raw)
To: Daniel Borkmann
Cc: Markus Elfring, bpf, netdev, Alexei Starovoitov,
Martin KaFai Lau, Song Liu, Yonghong Song, LKML, kernel-janitors
On Wed, Jul 03, 2019 at 12:09:51PM +0200, Daniel Borkmann wrote:
> On 07/02/2019 07:13 PM, Markus Elfring wrote:
> > From: Markus Elfring <elfring@users.sourceforge.net>
> > Date: Tue, 2 Jul 2019 19:04:08 +0200
> >
> > A string which did not contain a data format specification 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>
>
> The code is fine as is, I'm not applying this.
Just a heads up, this person/bot is in my kill-file, making it easier to
ignore crazy things like this. I recommend it for other maintainers to
also do as well.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-07-03 10:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-02 17:13 [PATCH] bpf: Replace a seq_printf() call by seq_puts() in btf_enum_seq_show() Markus Elfring
2019-07-02 18:02 ` Yonghong Song
2019-07-03 10:09 ` Daniel Borkmann
2019-07-03 10:43 ` Greg KH
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).