zonefs: Use str_plural() to fix Coccinelle warning
authorThorsten Blum <thorsten.blum@toblux.com>
Tue, 2 Apr 2024 10:17:16 +0000 (12:17 +0200)
committerDamien Le Moal <dlemoal@kernel.org>
Tue, 9 Apr 2024 22:23:47 +0000 (07:23 +0900)
Fixes the following Coccinelle/coccicheck warning reported by
string_choices.cocci:

opportunity for str_plural(zgroup->g_nr_zones)

Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
fs/zonefs/super.c

index c6a124e8d565febb690377ae982f60042ba2383b..964fa7f2400335dc8eb9456c3190aa36f2c0c8ec 100644 (file)
@@ -1048,7 +1048,7 @@ static int zonefs_init_zgroup(struct super_block *sb,
        zonefs_info(sb, "Zone group \"%s\" has %u file%s\n",
                    zonefs_zgroup_name(ztype),
                    zgroup->g_nr_zones,
-                   zgroup->g_nr_zones > 1 ? "s" : "");
+                   str_plural(zgroup->g_nr_zones));
 
        return 0;
 }