Skip to content

Commit 13bdc3c

Browse files
Martinhoff-makerkartben
authored andcommitted
drivers: serial: silabs: add __maybe_unused to eusart dma callback
The callback function for the DMA is not used in the case where no DMA properties are given in the esuart node in the device tree. It causes a warning in the CI build. Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
1 parent 429bf84 commit 13bdc3c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/serial/uart_silabs_eusart.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,8 @@ static void eusart_dma_rx_flush(struct eusart_data *data)
435435
}
436436
}
437437

438-
static void eusart_dma_rx_cb(const struct device *dma_dev, void *user_data, uint32_t channel,
439-
int status)
438+
__maybe_unused static void eusart_dma_rx_cb(const struct device *dma_dev, void *user_data,
439+
uint32_t channel, int status)
440440
{
441441
const struct device *uart_dev = user_data;
442442
struct eusart_data *data = uart_dev->data;
@@ -466,8 +466,8 @@ static void eusart_dma_rx_cb(const struct device *dma_dev, void *user_data, uint
466466
}
467467
}
468468

469-
static void eusart_dma_tx_cb(const struct device *dma_dev, void *user_data, uint32_t channel,
470-
int status)
469+
__maybe_unused static void eusart_dma_tx_cb(const struct device *dma_dev, void *user_data,
470+
uint32_t channel, int status)
471471
{
472472
const struct device *uart_dev = user_data;
473473
struct eusart_data *data = uart_dev->data;

0 commit comments

Comments
 (0)