diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2026-05-27 17:19:33 +0300 |
|---|---|---|
| committer | Yu Kuai <yukuai@fygo.io> | 2026-05-31 14:09:20 +0300 |
| commit | 717359a168bb66ac95f6161715d17e491ee86ca7 (patch) | |
| tree | 5338dc97828db67ed3eb69eb05cb55a314b6ff79 | |
| parent | 909d9dc3b5730c8ed7b764c68bc788342df2a07b (diff) | |
| download | linux-717359a168bb66ac95f6161715d17e491ee86ca7.tar.xz | |
md/raid0: use str_plural helper in dump_zones
Replace the manual ternary "s" pluralization with str_plural() to
simplify the code.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260527141932.1243503-2-thorsten.blum@linux.dev
Signed-off-by: Yu Kuai <yukuai@fygo.io>
| -rw-r--r-- | drivers/md/raid0.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c index 5e38a51e349a..699c2de8983a 100644 --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -14,6 +14,7 @@ #include <linux/seq_file.h> #include <linux/module.h> #include <linux/slab.h> +#include <linux/string_choices.h> #include <trace/events/block.h> #include "md.h" #include "raid0.h" @@ -43,7 +44,7 @@ static void dump_zones(struct mddev *mddev) int raid_disks = conf->strip_zone[0].nb_dev; pr_debug("md: RAID0 configuration for %s - %d zone%s\n", mdname(mddev), - conf->nr_strip_zones, conf->nr_strip_zones==1?"":"s"); + conf->nr_strip_zones, str_plural(conf->nr_strip_zones)); for (j = 0; j < conf->nr_strip_zones; j++) { char line[200]; int len = 0; |
