diff --git a/module/scmi_clock/src/mod_scmi_clock.c b/module/scmi_clock/src/mod_scmi_clock.c index 633fb6f50cbf5ae2423293a5391a12f25e6b690b..f92eb534410ce56e3b0419e3102ee7ebe220d077 100644 --- a/module/scmi_clock/src/mod_scmi_clock.c +++ b/module/scmi_clock/src/mod_scmi_clock.c @@ -1,6 +1,6 @@ /* * Arm SCP/MCP Software - * Copyright (c) 2015-2024, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2025, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause * @@ -1520,7 +1520,7 @@ static int scmi_clock_name_get_handler( const uint32_t *payload) { int status, respond_status; - unsigned int agent_id, clock_dev_idx; + unsigned int agent_id; const struct mod_scmi_clock_device *clock_device; size_t response_size; const struct scmi_clock_name_get_a2p *parameters; @@ -1553,9 +1553,7 @@ static int scmi_clock_name_get_handler( return status; } - clock_dev_idx = - scmi_clock_get_clock_device_idx(agent_id, parameters->clock_id); - if (!clock_has_extended_name(agent_id, clock_dev_idx)) { + if (!clock_has_extended_name(agent_id, parameters->clock_id)) { return_values.status = (int32_t)SCMI_NOT_SUPPORTED; goto exit; } diff --git a/module/scmi_clock/test/mod_scmi_clock_unit_test.c b/module/scmi_clock/test/mod_scmi_clock_unit_test.c index 8d568c6f0ef18dc32cb05a0b48eb9ecb30064128..2a0332057b6f33659f73c803c64d91e40c120764 100644 --- a/module/scmi_clock/test/mod_scmi_clock_unit_test.c +++ b/module/scmi_clock/test/mod_scmi_clock_unit_test.c @@ -1,6 +1,6 @@ /* * Arm SCP/MCP Software - * Copyright (c) 2022-2024, Arm Limited and Contributors. All rights reserved. + * Copyright (c) 2022-2025, Arm Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -1173,8 +1173,6 @@ void test_scmi_clock_name_get_handler_success(void) mod_scmi_from_protocol_api_get_agent_id_ExpectAnyArgsAndReturn(FWK_SUCCESS); mod_scmi_from_protocol_api_get_agent_id_ReturnThruPtr_agent_id(&agent_id); - fwk_id_get_element_idx_ExpectAnyArgsAndReturn(CLOCK_DEV_IDX_FAKE1); - fwk_id_get_element_idx_ExpectAnyArgsAndReturn(CLOCK_DEV_IDX_FAKE1); fwk_id_is_equal_ExpectAnyArgsAndReturn(true); @@ -1227,8 +1225,6 @@ void test_scmi_clock_name_get_handler_extended_name_not_supported(void) mod_scmi_from_protocol_api_get_agent_id_ExpectAnyArgsAndReturn(FWK_SUCCESS); mod_scmi_from_protocol_api_get_agent_id_ReturnThruPtr_agent_id(&agent_id); - fwk_id_get_element_idx_ExpectAnyArgsAndReturn(CLOCK_DEV_IDX_FAKE0); - mod_scmi_from_protocol_api_respond_Stub( clock_has_extended_name_callback);