You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ma...@apache.org on 2021/09/11 14:24:38 UTC

[incubator-nuttx] branch master updated: spinlock.h: In single CPU case force the lock passed to spin_lock_irqsave to be unused in the macro to avoid spreading UNUSED() or void throughout the code base.

This is an automated email from the ASF dual-hosted git repository.

masayuki pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 083272a  spinlock.h: In single CPU case force the lock passed to spin_lock_irqsave to be unused in the macro to avoid spreading UNUSED() or void throughout the code base.
083272a is described below

commit 083272ad927265e71cfd52238b5ae5384b157343
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Sat Sep 11 14:07:11 2021 +0200

    spinlock.h: In single CPU case force the lock passed to
    spin_lock_irqsave to be unused in the macro to avoid spreading
    UNUSED() or void throughout the code base.
    
    Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
 include/nuttx/spinlock.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/nuttx/spinlock.h b/include/nuttx/spinlock.h
index f9bf003..af074e0 100644
--- a/include/nuttx/spinlock.h
+++ b/include/nuttx/spinlock.h
@@ -389,7 +389,7 @@ void spin_clrbit(FAR volatile cpu_set_t *set, unsigned int cpu,
 #if defined(CONFIG_SMP)
 irqstate_t spin_lock_irqsave(spinlock_t *lock);
 #else
-#  define spin_lock_irqsave(l) up_irq_save()
+#  define spin_lock_irqsave(l) ((void)(l), up_irq_save())
 #endif
 
 /****************************************************************************