Skip to content

Commit

Permalink
[nrf fromtree] modules: hal_nordic: suppress 'unused variable' warnings
Browse files Browse the repository at this point in the history
Refactors the code to avoid 'unused variable' warning
that is problematic for some builds.

Signed-off-by: Piotr Koziar <[email protected]>
(cherry picked from commit 8f83ffc302dec61a06418efa317336016e820c65)
  • Loading branch information
piotrkoziar authored and anangl committed Jan 30, 2025
1 parent f22cb03 commit 40113d9
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,28 @@ static void hfclk_on_callback(struct onoff_manager *mgr,
#if defined(CONFIG_CLOCK_CONTROL_NRF)
void nrf_802154_clock_hfclk_start(void)
{
int ret;
struct onoff_manager *mgr =
z_nrf_clock_control_get_onoff(CLOCK_CONTROL_NRF_SUBSYS_HF);

__ASSERT_NO_MSG(mgr != NULL);

sys_notify_init_callback(&hfclk_cli.notify, hfclk_on_callback);

ret = onoff_request(mgr, &hfclk_cli);
int ret = onoff_request(mgr, &hfclk_cli);
__ASSERT_NO_MSG(ret >= 0);
(void)ret;
}

void nrf_802154_clock_hfclk_stop(void)
{
int ret;
struct onoff_manager *mgr =
z_nrf_clock_control_get_onoff(CLOCK_CONTROL_NRF_SUBSYS_HF);

__ASSERT_NO_MSG(mgr != NULL);

ret = onoff_cancel_or_release(mgr, &hfclk_cli);
int ret = onoff_cancel_or_release(mgr, &hfclk_cli);
__ASSERT_NO_MSG(ret >= 0);
(void)ret;
hfclk_is_running = false;
}

Expand All @@ -78,6 +78,7 @@ void nrf_802154_clock_hfclk_start(void)
int ret = nrf_clock_control_request(DEVICE_DT_GET(DT_NODELABEL(hfxo)), NULL, &hfclk_cli);

__ASSERT_NO_MSG(ret >= 0);
(void)ret;
}

void nrf_802154_clock_hfclk_stop(void)
Expand All @@ -86,6 +87,7 @@ void nrf_802154_clock_hfclk_stop(void)
NULL, &hfclk_cli);

__ASSERT_NO_MSG(ret >= 0);
(void)ret;
}

#endif

0 comments on commit 40113d9

Please sign in to comment.