Skip to content

Commit

Permalink
dma: cleaning likely usage and fix autotest typo
Browse files Browse the repository at this point in the history
  • Loading branch information
pthierry-ledger committed Oct 9, 2024
1 parent 75c336b commit 1d63d68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion autotest/src/tests/test_signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
8 changes: 2 additions & 6 deletions kernel/src/managers/dma/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 1d63d68

Please sign in to comment.