From 1d63d68a3d8e9bdeff17b07ffb287c2c76818ca5 Mon Sep 17 00:00:00 2001 From: pthierry Date: Wed, 9 Oct 2024 16:01:25 +0200 Subject: [PATCH] dma: cleaning likely usage and fix autotest typo --- autotest/src/tests/test_signal.c | 2 +- kernel/src/managers/dma/dma.c | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/autotest/src/tests/test_signal.c b/autotest/src/tests/test_signal.c index 77d4a499..493d58bd 100644 --- a/autotest/src/tests/test_signal.c +++ b/autotest/src/tests/test_signal.c @@ -13,7 +13,7 @@ void test_signal_sendrecv(void) { Status ret; taskh_t handle = 0; - int32_t timeout = 20UL; + int32_t timeout = 20L; uint8_t data[CONFIG_SVC_EXCHANGE_AREA_LEN] = {0}; exchange_event_t *header; diff --git a/kernel/src/managers/dma/dma.c b/kernel/src/managers/dma/dma.c index b68e89af..9292cbe8 100644 --- a/kernel/src/managers/dma/dma.c +++ b/kernel/src/managers/dma/dma.c @@ -448,9 +448,7 @@ kstatus_t mgr_dma_stream_suspend(const dmah_t dmah) /*@ assert \valid_read(cfg->meta); */ /* can't unassign a stream that is started or already unassigned */ - if (unlikely( - (cfg->state != DMA_STREAM_STATE_STARTED) - )) { + if (unlikely(cfg->state != DMA_STREAM_STATE_STARTED)) { status = K_ERROR_BADSTATE; goto end; } @@ -486,9 +484,7 @@ kstatus_t mgr_dma_stream_resume(const dmah_t dmah) /*@ assert \valid_read(cfg->meta); */ /* can't unassign a stream that is started or already unassigned */ - if (unlikely( - (cfg->state != DMA_STREAM_STATE_SUSPENDED) - )) { + if (unlikely(cfg->state != DMA_STREAM_STATE_SUSPENDED)) { status = K_ERROR_BADSTATE; goto end; }