aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Elfring <[email protected]>2024-07-15 11:12:30 +0200
committerAndrii Nakryiko <[email protected]>2024-07-29 12:53:04 -0700
commitf157f9cb85b49745754f8c301c59c6ca110e865f (patch)
tree77a4f7a63c6528632ab592dd87075773454eaf07
parentdf862de41fcde6a0a4906647b0cacec2a8db5cf3 (diff)
bpf: Simplify character output in seq_print_delegate_opts()
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 <[email protected]> Signed-off-by: Markus Elfring <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
-rw-r--r--kernel/bpf/inode.c4
1 files 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++;
}