[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <abde0992-3d71-44d2-ab27-75b382933a22@web.de>
Date: Mon, 15 Jul 2024 11:20:27 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: bpf@...r.kernel.org, kernel-janitors@...r.kernel.org,
Alexei Starovoitov <ast@...nel.org>, Andrii Nakryiko <andrii@...nel.org>,
Christophe Jaillet <christophe.jaillet@...adoo.fr>,
Daniel Borkmann <daniel@...earbox.net>, Eduard Zingerman
<eddyz87@...il.com>, Hao Luo <haoluo@...gle.com>,
Jiri Olsa <jolsa@...nel.org>, John Fastabend <john.fastabend@...il.com>,
KP Singh <kpsingh@...nel.org>, Martin KaFai Lau <martin.lau@...ux.dev>,
Song Liu <song@...nel.org>, Stanislav Fomichev <sdf@...ichev.me>,
Yonghong Song <yonghong.song@...ux.dev>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] bpf: Simplify character output in seq_print_delegate_opts()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Mon, 15 Jul 2024 11:12:30 +0200
Single characters should be put into a sequence.
Thus use the corresponding function “seq_putc” for two 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>
---
kernel/bpf/inode.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/bpf/inode.c b/kernel/bpf/inode.c
index af5d2ffadd70..d8fc5eba529d 100644
--- a/kernel/bpf/inode.c
+++ b/kernel/bpf/inode.c
@@ -709,10 +709,10 @@ static void seq_print_delegate_opts(struct seq_file *m,
msk = 1ULL << e->val;
if (delegate_msk & msk) {
/* emit lower-case name without prefix */
- seq_printf(m, "%c", first ? '=' : ':');
+ seq_putc(m, first ? '=' : ':');
name += pfx_len;
while (*name) {
- seq_printf(m, "%c", tolower(*name));
+ seq_putc(m, tolower(*name));
name++;
}
--
2.45.2
Powered by blists - more mailing lists