Skip to content

Commit 6eed708

Browse files
liming011davejiang
authored andcommitted
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>
1 parent 2c59754 commit 6eed708

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

drivers/cxl/core/features.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -426,14 +426,6 @@ static void *cxlctl_get_supported_features(struct cxl_features_state *cxlfs,
426426

427427
rpc_out->size = struct_size(feat_out, ents, requested);
428428
feat_out = &rpc_out->get_sup_feats_out;
429-
if (requested == 0) {
430-
feat_out->num_entries = cpu_to_le16(requested);
431-
feat_out->supported_feats =
432-
cpu_to_le16(cxlfs->entries->num_features);
433-
rpc_out->retval = CXL_MBOX_CMD_RC_SUCCESS;
434-
*out_len = out_size;
435-
return no_free_ptr(rpc_out);
436-
}
437429

438430
for (i = start, pos = &feat_out->ents[0];
439431
i < cxlfs->entries->num_features; i++, pos++) {

0 commit comments

Comments
 (0)