tests: use unsigned int for irq_lock()

irq_lock() returns an unsigned integer key.
Generated by spatch using semantic patch
scripts/coccinelle/irq_lock.cocci

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
Johann Fischer 2022-07-13 17:19:34 +02:00 committed by Mahesh Mahadevan
commit d66e047e5b
5 changed files with 6 additions and 6 deletions

View file

@ -395,7 +395,7 @@ void z_impl_test_arm_user_interrupt_syscall(void)
first_call = 0;
/* Lock IRQs in supervisor mode */
int key = irq_lock();
unsigned int key = irq_lock();
/* Verify that IRQs were not already locked */
zassert_false(key, "IRQs locked in system call\n");

View file

@ -176,7 +176,7 @@ ZTEST(arm_irq_zero_latency_levels, test_arm_zero_latency_levels)
NVIC_EnableIRQ(irq_b);
/* Lock interrupts */
int key = irq_lock();
unsigned int key = irq_lock();
execution_trace_add(STEP_MAIN_BEGIN);

View file

@ -265,7 +265,7 @@ static void test_async_on_stopped_on_instance(const struct device *dev,
{
enum clock_control_status status;
int err;
int key;
unsigned int key;
bool executed = false;
status = clock_control_get_status(dev, subsys);

View file

@ -249,7 +249,7 @@ void test_k_mem_page_in(void)
void test_k_mem_pin(void)
{
unsigned long faults;
int key;
unsigned int key;
k_mem_pin(arena, HALF_BYTES);
@ -293,7 +293,7 @@ void test_k_mem_unpin(void)
void test_backing_store_capacity(void)
{
char *mem, *ret;
int key;
unsigned int key;
unsigned long faults;
size_t size = (((CONFIG_BACKING_STORE_RAM_PAGES - 1) - HALF_PAGES) *
CONFIG_MMU_PAGE_SIZE);

View file

@ -923,7 +923,7 @@ void test_oops_stackcheck(void)
void z_impl_check_syscall_context(void)
{
int key = irq_lock();
unsigned int key = irq_lock();
irq_unlock(key);