diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-01-16 12:06:09 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-15 10:20:19 +0800 |
commit | 0af36e434a3cf8a32e68d77da66cad6b8502b532 (patch) | |
tree | 034c33da16af26cde9b7cfad894e1579ce0039ce /include | |
parent | cde805106887b01347a227c0acead5fc087a585b (diff) | |
download | linux-stable-0af36e434a3cf8a32e68d77da66cad6b8502b532.tar.gz linux-stable-0af36e434a3cf8a32e68d77da66cad6b8502b532.tar.bz2 linux-stable-0af36e434a3cf8a32e68d77da66cad6b8502b532.zip |
libceph: use BUG() instead of BUG_ON(1)
commit d24cdcd3e40a6825135498e11c20c7976b9bf545 upstream.
I ran into this compile warning, which is the result of BUG_ON(1)
not always leading to the compiler treating the code path as
unreachable:
include/linux/ceph/osdmap.h: In function 'ceph_can_shift_osds':
include/linux/ceph/osdmap.h:62:1: error: control reaches end of non-void function [-Werror=return-type]
Using BUG() here avoids the warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ceph/osdmap.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h index 9a9041784dcf..412906609954 100644 --- a/include/linux/ceph/osdmap.h +++ b/include/linux/ceph/osdmap.h @@ -57,7 +57,7 @@ static inline bool ceph_can_shift_osds(struct ceph_pg_pool_info *pool) case CEPH_POOL_TYPE_EC: return false; default: - BUG_ON(1); + BUG(); } } |