diff --git a/tests/drivers/uart/uart_async_api/src/test_uart_async.c b/tests/drivers/uart/uart_async_api/src/test_uart_async.c index 0506ff0a01f..3f56bbe1d80 100644 --- a/tests/drivers/uart/uart_async_api/src/test_uart_async.c +++ b/tests/drivers/uart/uart_async_api/src/test_uart_async.c @@ -24,12 +24,12 @@ K_SEM_DEFINE(rx_buf_coherency, 0, 255); K_SEM_DEFINE(rx_buf_released, 0, 1); K_SEM_DEFINE(rx_disabled, 0, 1); -ZTEST_BMEM volatile bool failed_in_isr; +static ZTEST_BMEM volatile bool failed_in_isr; static ZTEST_BMEM const struct device *const uart_dev = DEVICE_DT_GET(UART_NODE); static void read_abort_timeout(struct k_timer *timer); -K_TIMER_DEFINE(read_abort_timer, read_abort_timeout, NULL); +static K_TIMER_DEFINE(read_abort_timer, read_abort_timeout, NULL); static void init_test(void) @@ -100,7 +100,7 @@ struct test_data { #if NOCACHE_MEM static struct test_data tdata __used __NOCACHE; #else -ZTEST_BMEM struct test_data tdata; +static ZTEST_BMEM struct test_data tdata; #endif /* NOCACHE_MEM */ static void test_single_read_callback(const struct device *dev, @@ -331,14 +331,14 @@ static __aligned(32) uint8_t chained_read_buf_0[8] __used __NOCACHE; static __aligned(32) uint8_t chained_read_buf_1[8] __used __NOCACHE; static __aligned(32) uint8_t chained_cpy_buf[10] __used __NOCACHE; #else -ZTEST_BMEM uint8_t chained_read_buf_0[8]; -ZTEST_BMEM uint8_t chained_read_buf_1[8]; -ZTEST_BMEM uint8_t chained_cpy_buf[10]; +static ZTEST_BMEM uint8_t chained_read_buf_0[8]; +static ZTEST_BMEM uint8_t chained_read_buf_1[8]; +static ZTEST_BMEM uint8_t chained_cpy_buf[10]; #endif /* NOCACHE_MEM */ -ZTEST_BMEM volatile uint8_t rx_data_idx; -ZTEST_BMEM uint8_t rx_buf_idx; +static ZTEST_BMEM volatile uint8_t rx_data_idx; +static ZTEST_BMEM uint8_t rx_buf_idx; -ZTEST_BMEM uint8_t *read_ptr; +static ZTEST_BMEM uint8_t *read_ptr; static uint8_t *chained_read_buf[2] = {chained_read_buf_0, chained_read_buf_1}; @@ -422,9 +422,9 @@ ZTEST_USER(uart_async_chain_read, test_chained_read) #if NOCACHE_MEM static __aligned(32) uint8_t double_buffer[2][12] __used __NOCACHE; #else -ZTEST_BMEM uint8_t double_buffer[2][12]; +static ZTEST_BMEM uint8_t double_buffer[2][12]; #endif /* NOCACHE_MEM */ -ZTEST_DMEM uint8_t *next_buf = double_buffer[1]; +static ZTEST_DMEM uint8_t *next_buf = double_buffer[1]; static void test_double_buffer_callback(const struct device *dev, struct uart_event *evt, void *user_data) @@ -497,10 +497,10 @@ ZTEST_USER(uart_async_double_buf, test_double_buffer) static __aligned(32) uint8_t test_read_abort_rx_buf[2][100] __used __NOCACHE; static __aligned(32) uint8_t test_read_abort_read_buf[100] __used __NOCACHE; #else -ZTEST_BMEM uint8_t test_read_abort_rx_buf[2][100]; -ZTEST_BMEM uint8_t test_read_abort_read_buf[100]; +static ZTEST_BMEM uint8_t test_read_abort_rx_buf[2][100]; +static ZTEST_BMEM uint8_t test_read_abort_read_buf[100]; #endif /* NOCACHE_MEM */ -ZTEST_BMEM int test_read_abort_rx_cnt; +static ZTEST_BMEM int test_read_abort_rx_cnt; static void test_read_abort_callback(const struct device *dev, struct uart_event *evt, void *user_data) @@ -613,12 +613,12 @@ ZTEST_USER(uart_async_read_abort, test_read_abort) } -ZTEST_BMEM volatile size_t sent; -ZTEST_BMEM volatile size_t received; +static ZTEST_BMEM volatile size_t sent; +static ZTEST_BMEM volatile size_t received; #if NOCACHE_MEM static __aligned(32) uint8_t test_rx_buf[2][100] __used __NOCACHE; #else -ZTEST_BMEM uint8_t test_rx_buf[2][100]; +static ZTEST_BMEM uint8_t test_rx_buf[2][100]; #endif /* NOCACHE_MEM */ static void test_write_abort_callback(const struct device *dev, @@ -776,12 +776,12 @@ ZTEST_USER(uart_async_timeout, test_forever_timeout) #if NOCACHE_MEM -const uint8_t chained_write_tx_bufs[2][10] = {"Message 1", "Message 2"}; +static const uint8_t chained_write_tx_bufs[2][10] = {"Message 1", "Message 2"}; #else -ZTEST_DMEM uint8_t chained_write_tx_bufs[2][10] = {"Message 1", "Message 2"}; +static ZTEST_DMEM uint8_t chained_write_tx_bufs[2][10] = {"Message 1", "Message 2"}; #endif /* NOCACHE_MEM */ -ZTEST_DMEM bool chained_write_next_buf = true; -ZTEST_BMEM volatile uint8_t tx_sent; +static ZTEST_DMEM bool chained_write_next_buf = true; +static ZTEST_BMEM volatile uint8_t tx_sent; static void test_chained_write_callback(const struct device *dev, struct uart_event *evt, void *user_data) @@ -863,12 +863,12 @@ static __aligned(32) uint8_t long_rx_buf[RX_LONG_BUFFER] __used __NOCACHE; static __aligned(32) uint8_t long_rx_buf2[RX_LONG_BUFFER] __used __NOCACHE; static __aligned(32) uint8_t long_tx_buf[TX_LONG_BUFFER] __used __NOCACHE; #else -ZTEST_BMEM uint8_t long_rx_buf[RX_LONG_BUFFER]; -ZTEST_BMEM uint8_t long_rx_buf2[RX_LONG_BUFFER]; -ZTEST_BMEM uint8_t long_tx_buf[TX_LONG_BUFFER]; +static ZTEST_BMEM uint8_t long_rx_buf[RX_LONG_BUFFER]; +static ZTEST_BMEM uint8_t long_rx_buf2[RX_LONG_BUFFER]; +static ZTEST_BMEM uint8_t long_tx_buf[TX_LONG_BUFFER]; #endif /* NOCACHE_MEM */ -ZTEST_BMEM volatile uint8_t evt_num; -ZTEST_BMEM size_t long_received[2]; +static ZTEST_BMEM volatile uint8_t evt_num; +static ZTEST_BMEM size_t long_received[2]; static void test_long_buffers_callback(const struct device *dev, struct uart_event *evt, void *user_data)