mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 22:52:19 +02:00
cxl/region: use str_enabled_disabled() instead of ternary operator
Replace ternary operator with str_enabled_disabled() helper to enhance code readability and consistency. [dj: Fix spelling in commit log and subject. ] Signed-off-by: Nai-Chen Cheng <bleach1827@gmail.com> Reviewed-by: Alison Schofield <alison.schofield@intel.com> Link: https://patch.msgid.link/20250812-cxl-region-string-choices-v1-1-50200b0bc782@gmail.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
This commit is contained in:
parent
22fb4ad898
commit
733c4e9bce
|
|
@ -10,6 +10,7 @@
|
|||
#include <linux/sort.h>
|
||||
#include <linux/idr.h>
|
||||
#include <linux/memory-tiers.h>
|
||||
#include <linux/string_choices.h>
|
||||
#include <cxlmem.h>
|
||||
#include <cxl.h>
|
||||
#include "core.h"
|
||||
|
|
@ -1468,9 +1469,7 @@ static int cxl_port_setup_targets(struct cxl_port *port,
|
|||
dev_name(port->uport_dev), dev_name(&port->dev),
|
||||
__func__, cxld->interleave_ways,
|
||||
cxld->interleave_granularity,
|
||||
(cxld->flags & CXL_DECODER_F_ENABLE) ?
|
||||
"enabled" :
|
||||
"disabled",
|
||||
str_enabled_disabled(cxld->flags & CXL_DECODER_F_ENABLE),
|
||||
cxld->hpa_range.start, cxld->hpa_range.end);
|
||||
return -ENXIO;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user