Commit 11bdf36b authored by Xichao Zhao's avatar Xichao Zhao Committed by Ira Weiny
Browse files

nvdimm: Use str_plural() to simplify the code



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

Signed-off-by: default avatarXichao Zhao <zhao.xichao@vivo.com>
Reviewed-by: default avatarDave Jiang <dave.jiang@intel.com>
Signed-off-by: default avatarIra Weiny <ira.weiny@intel.com>
parent f83ec76b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1983,7 +1983,7 @@ static struct device **scan_labels(struct nd_region *nd_region)
	}

	dev_dbg(&nd_region->dev, "discovered %d namespace%s\n", count,
		count == 1 ? "" : "s");
		str_plural(count));

	if (count == 0) {
		struct nd_namespace_pmem *nspm;
+1 −1
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ static int nd_region_probe(struct device *dev)
	 * "<async-registered>/<total>" namespace count.
	 */
	dev_err(dev, "failed to register %d namespace%s, continuing...\n",
			err, err == 1 ? "" : "s");
			err, str_plural(err));
	return 0;
}