Commit 4c2feeee authored by Yaron Micher's avatar Yaron Micher
Browse files

scmi: fix psci protocol-count assertions



There are 2 asserts that check that protocol_count > dis_protocol_count_psci,
instead of checking protocol_count >= dis_protocol_count_psci.
This causes the assertion to fail when the values are equal, and it
shouldn't because the 2 values can be equal.
Signed-off-by: default avatarYaron Micher <yaronm@hailo.ai>
parent 2a519a7f
Pipeline #143 passed with stage
in 0 seconds
......@@ -740,7 +740,7 @@ static int scmi_base_protocol_attributes_handler(fwk_id_t service_id,
*/
if (agent_type == SCMI_AGENT_TYPE_PSCI) {
fwk_assert(
scmi_ctx.protocol_count > scmi_ctx.config->dis_protocol_count_psci);
scmi_ctx.protocol_count >= scmi_ctx.config->dis_protocol_count_psci);
protocol_count =
scmi_ctx.protocol_count - scmi_ctx.config->dis_protocol_count_psci;
} else
......@@ -908,7 +908,7 @@ static int scmi_base_discover_list_protocols_handler(fwk_id_t service_id,
if (agent_type == SCMI_AGENT_TYPE_PSCI) {
fwk_assert(
scmi_ctx.protocol_count > scmi_ctx.config->dis_protocol_count_psci);
scmi_ctx.protocol_count >= scmi_ctx.config->dis_protocol_count_psci);
protocol_count_psci =
scmi_ctx.protocol_count - scmi_ctx.config->dis_protocol_count_psci;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment