ext4: use seq_putc() in two functions
authorMarkus Elfring <elfring@users.sourceforge.net>
Sat, 13 Jul 2024 15:10:24 +0000 (17:10 +0200)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 27 Aug 2024 01:20:57 +0000 (21:20 -0400)
Single characters (line breaks) should be put into a sequence.
Thus use the corresponding function “seq_putc”.

This issue was transformed by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Link: https://patch.msgid.link/076974ab-4da3-4176-89dc-0514e020c276@web.de
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/mballoc.c
fs/ext4/super.c

index 9dda9cd68ab2f5daf595957e4248e97229ec3ab8..2008d2d524c998522e424c170c1eaf0cf765b538 100644 (file)
@@ -3075,8 +3075,7 @@ static int ext4_mb_seq_groups_show(struct seq_file *seq, void *v)
        seq_puts(seq, " ]");
        if (EXT4_MB_GRP_BBITMAP_CORRUPT(&sg.info))
                seq_puts(seq, " Block bitmap corrupted!");
-       seq_puts(seq, "\n");
-
+       seq_putc(seq, '\n');
        return 0;
 }
 
index 25cd0d662e31be7995a3d24cfdaecc5edff98ef4..7806044ed8162cd267f37eccaeb1f209b52e70f5 100644 (file)
@@ -3045,7 +3045,7 @@ int ext4_seq_options_show(struct seq_file *seq, void *offset)
 
        seq_puts(seq, sb_rdonly(sb) ? "ro" : "rw");
        rc = _ext4_show_options(seq, sb, 1);
-       seq_puts(seq, "\n");
+       seq_putc(seq, '\n');
        return rc;
 }