diff options
author | Li Ming <ming.li@zohomail.com> | 2025-05-16 17:32:20 +0300 |
---|---|---|
committer | Dave Jiang <dave.jiang@intel.com> | 2025-05-19 18:58:04 +0300 |
commit | 6eed708a5693709ff0d4dd8512b6934be30d4283 (patch) | |
tree | efffe24302e0f553facb9b59d18990ea04435323 | |
parent | 2c5975498e55ec261dfe715199979784e24895bb (diff) | |
download | linux-6eed708a5693709ff0d4dd8512b6934be30d4283.tar.xz |
cxl/feature: Remove redundant code of get supported features
In cxlctl_get_supported_features(), there is a code block that handles
the case where the requested is equal to 0. But the code following the
code block can also handle this situation. So the code block is not
needed.
Signed-off-by: Li Ming <ming.li@zohomail.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20250516143220.35302-1-ming.li@zohomail.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
-rw-r--r-- | drivers/cxl/core/features.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/cxl/core/features.c b/drivers/cxl/core/features.c index bd512100ef8d..2167a8d6ff85 100644 --- a/drivers/cxl/core/features.c +++ b/drivers/cxl/core/features.c @@ -426,14 +426,6 @@ static void *cxlctl_get_supported_features(struct cxl_features_state *cxlfs, rpc_out->size = struct_size(feat_out, ents, requested); feat_out = &rpc_out->get_sup_feats_out; - if (requested == 0) { - feat_out->num_entries = cpu_to_le16(requested); - feat_out->supported_feats = - cpu_to_le16(cxlfs->entries->num_features); - rpc_out->retval = CXL_MBOX_CMD_RC_SUCCESS; - *out_len = out_size; - return no_free_ptr(rpc_out); - } for (i = start, pos = &feat_out->ents[0]; i < cxlfs->entries->num_features; i++, pos++) { |