Skip to content

Commit 51f1bb9

Browse files
elfringanakryiko
authored andcommitted
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]
1 parent 173c57b commit 51f1bb9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/bpf/inode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -709,10 +709,10 @@ static void seq_print_delegate_opts(struct seq_file *m,
709709
msk = 1ULL << e->val;
710710
if (delegate_msk & msk) {
711711
/* emit lower-case name without prefix */
712-
seq_printf(m, "%c", first ? '=' : ':');
712+
seq_putc(m, first ? '=' : ':');
713713
name += pfx_len;
714714
while (*name) {
715-
seq_printf(m, "%c", tolower(*name));
715+
seq_putc(m, tolower(*name));
716716
name++;
717717
}
718718

0 commit comments

Comments
 (0)