diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2017-04-04 00:28:13 -0800 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2017-04-04 06:43:08 -0800 |
commit | 978c16040525ffe1199bed6afd799eaa64d0f01c (patch) | |
tree | 789f68229be0af9579238a6d1e86af576ab33b3d /include/linux | |
parent | 64c325ef483c863c720a7f53c6b3126e583e05a0 (diff) |
Fix some clang warnings
the issue in cmd_debug - passing members of struct bpos to kstrtoull,
which aren't aligned - was a legit bug
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/blkdev.h | 2 | ||||
-rw-r--r-- | include/linux/bug.h | 6 | ||||
-rw-r--r-- | include/linux/spinlock.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 1c793b51..eb157269 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -4,8 +4,8 @@ #include <linux/backing-dev.h> #include <linux/blk_types.h> #include <linux/kobject.h> +#include <linux/types.h> -typedef u64 sector_t; typedef unsigned fmode_t; struct bio; diff --git a/include/linux/bug.h b/include/linux/bug.h index f01e5f7c..aa5776c7 100644 --- a/include/linux/bug.h +++ b/include/linux/bug.h @@ -22,10 +22,10 @@ #define WARN(cond, ...) assert(!(cond)) #define WARN_ON(condition) ({ \ - int __ret_warn_on = !!(condition); \ - if (unlikely(__ret_warn_on)) \ + int __ret_warn_on = unlikely(!!(condition)); \ + if (__ret_warn_on) \ __WARN(); \ - unlikely(__ret_warn_on); \ + __ret_warn_on; \ }) #endif /* __TOOLS_LINUX_BUG_H */ diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h index 0fa79a37..c9be6b61 100644 --- a/include/linux/spinlock.h +++ b/include/linux/spinlock.h @@ -30,7 +30,7 @@ static inline void raw_spin_unlock(raw_spinlock_t *lock) #define raw_spin_lock_irqsave(lock, flags) \ do { \ - (void) flags; \ + flags = 0; \ raw_spin_lock(lock); \ } while (0) |