Skip to content

Commit 6eed708

Browse files
MingLi-4davejiang
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 <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Reviewed-by: Dave Jiang <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Dave Jiang <[email protected]>
1 parent 2c59754 commit 6eed708

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

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)