Skip to content

Commit 22fb4ad

Browse files
Xichao Zhaodavejiang
authored andcommitted
cxl/hdm: 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: Alison Schofield <alison.schofield@intel.com> Reviewed-by: Dave Jiang <dave.jiang@intel.com> Link: https://patch.msgid.link/20250811122519.543554-1-zhao.xichao@vivo.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
1 parent 8f5ae30 commit 22fb4ad

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/cxl/core/hdm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ struct cxl_hdm *devm_cxl_setup_hdm(struct cxl_port *port,
197197
*/
198198
if (should_emulate_decoders(info)) {
199199
dev_dbg(dev, "Fallback map %d range register%s\n", info->ranges,
200-
info->ranges > 1 ? "s" : "");
200+
str_plural(info->ranges));
201201
cxlhdm->decoder_count = info->ranges;
202202
}
203203

0 commit comments

Comments
 (0)