different subsystems: 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:11:05 +02:00 committed by Mahesh Mahadevan
parent 5e5ea9a21d
commit f7c9f328a4
5 changed files with 9 additions and 9 deletions

View file

@ -26,7 +26,7 @@ static void nru_periodic_update(struct k_timer *timer)
{
uintptr_t phys;
struct z_page_frame *pf;
int key = irq_lock();
unsigned int key = irq_lock();
Z_PAGE_FRAME_FOREACH(phys, pf) {
if (!z_page_frame_is_evictable(pf)) {

View file

@ -740,7 +740,7 @@ static void gptp_update_local_port_clock(void)
int64_t second_diff;
const struct device *clk;
struct net_ptp_time tm;
int key;
unsigned int key;
state = &GPTP_STATE()->clk_slave_sync;
global_ds = GPTP_GLOBAL_DS();

View file

@ -63,7 +63,7 @@ osEventFlagsId_t osEventFlagsNew(const osEventFlagsAttr_t *attr)
uint32_t osEventFlagsSet(osEventFlagsId_t ef_id, uint32_t flags)
{
struct cv2_event_flags *events = (struct cv2_event_flags *)ef_id;
int key;
unsigned int key;
if ((ef_id == NULL) || (flags & osFlagsError)) {
return osFlagsErrorParameter;
@ -84,7 +84,7 @@ uint32_t osEventFlagsSet(osEventFlagsId_t ef_id, uint32_t flags)
uint32_t osEventFlagsClear(osEventFlagsId_t ef_id, uint32_t flags)
{
struct cv2_event_flags *events = (struct cv2_event_flags *)ef_id;
int key;
unsigned int key;
uint32_t sig;
if ((ef_id == NULL) || (flags & osFlagsError)) {

View file

@ -15,7 +15,7 @@
*/
uint32_t osThreadFlagsSet(osThreadId_t thread_id, uint32_t flags)
{
int key;
unsigned int key;
struct cv2_thread *tid = (struct cv2_thread *)thread_id;
if ((thread_id == NULL) || (is_cmsis_rtos_v2_thread(thread_id) == NULL)

View file

@ -57,7 +57,7 @@ void sys_trace_k_thread_switched_in(void)
/* FIXME: Limitation of the current x86 EFI cosnole implementation. */
#if !defined(CONFIG_X86_EFI_CONSOLE) && !defined(CONFIG_UART_CONSOLE)
int key = irq_lock();
unsigned int key = irq_lock();
__ASSERT_NO_MSG(nested_interrupts[_current_cpu->id] == 0);
/* Can't use k_current_get as thread base and z_tls_current might be incorrect */
@ -70,7 +70,7 @@ void sys_trace_k_thread_switched_in(void)
void sys_trace_k_thread_switched_out(void)
{
#if !defined(CONFIG_X86_EFI_CONSOLE) && !defined(CONFIG_UART_CONSOLE)
int key = irq_lock();
unsigned int key = irq_lock();
__ASSERT_NO_MSG(nested_interrupts[_current_cpu->id] == 0);
/* Can't use k_current_get as thread base and z_tls_current might be incorrect */
@ -102,7 +102,7 @@ void sys_trace_thread_pend(struct k_thread *thread)
void sys_trace_isr_enter(void)
{
int key = irq_lock();
unsigned int key = irq_lock();
_cpu_t *curr_cpu = _current_cpu;
sys_trace_isr_enter_user(nested_interrupts[curr_cpu->id]);
@ -113,7 +113,7 @@ void sys_trace_isr_enter(void)
void sys_trace_isr_exit(void)
{
int key = irq_lock();
unsigned int key = irq_lock();
_cpu_t *curr_cpu = _current_cpu;
nested_interrupts[curr_cpu->id]--;