diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2015-12-10 09:22:49 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-12-10 11:05:07 +0100 |
commit | f256280006afbf51ddf267c69ca4f5b229696c7c (patch) | |
tree | 196e7ec295f35e41bfd6edb6e1a1ec2f33acf0d8 /include | |
parent | ce4dc6df3bcbce61e8e4616cde2eaf947e32f012 (diff) | |
download | barebox-f256280006afbf51ddf267c69ca4f5b229696c7c.tar.gz barebox-f256280006afbf51ddf267c69ca4f5b229696c7c.tar.xz |
linux/barebox-wrapper: Silence gcc5 warning
gcc5 warns about using flags uninitialized in spin_lock_irqsave,
although it could look into the static inline spin_lock_irqsave
implementation and see it's not used at all. An empty define instead
of the static inline wrapper would lead to a "unused variable" warning.
Let's create a macro and fake some usage of the flags variable. This
probably helps until gcc6 is out.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/barebox-wrapper.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/barebox-wrapper.h b/include/linux/barebox-wrapper.h index 3859185186..5fe7971018 100644 --- a/include/linux/barebox-wrapper.h +++ b/include/linux/barebox-wrapper.h @@ -39,8 +39,8 @@ typedef int spinlock_t; #define spin_lock_init(...) #define spin_lock(...) #define spin_unlock(...) -static inline void spin_lock_irqsave(spinlock_t *lock, unsigned long flags) {} -static inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags) {} +#define spin_lock_irqsave(lock, flags) do { flags = 0; } while (0) +#define spin_unlock_irqrestore(lock, flags) do { flags = flags; } while (0) #define mutex_init(...) #define mutex_lock(...) |