Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

nvdimm: Use str_plural() to simplify the code

Use the string choice helper function str_plural() to simplify the code.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>

authored by

Xichao Zhao and committed by
Ira Weiny
11bdf36b f83ec76b

+2 -2
+1 -1
drivers/nvdimm/namespace_devs.c
··· 1983 1983 } 1984 1984 1985 1985 dev_dbg(&nd_region->dev, "discovered %d namespace%s\n", count, 1986 - count == 1 ? "" : "s"); 1986 + str_plural(count)); 1987 1987 1988 1988 if (count == 0) { 1989 1989 struct nd_namespace_pmem *nspm;
+1 -1
drivers/nvdimm/region.c
··· 70 70 * "<async-registered>/<total>" namespace count. 71 71 */ 72 72 dev_err(dev, "failed to register %d namespace%s, continuing...\n", 73 - err, err == 1 ? "" : "s"); 73 + err, str_plural(err)); 74 74 return 0; 75 75 } 76 76