diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-01-16 14:06:09 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-15 05:02:51 +0300 |
commit | 290215a2abfd9c0ede35dfc753439ef61cfd679b (patch) | |
tree | 66c2aff35678ce207b327ed703bf1b38a4409f38 /include/linux/ceph | |
parent | ff3bcdc9b5f00809a18cc1a3ea42a72e00b1a895 (diff) | |
download | linux-290215a2abfd9c0ede35dfc753439ef61cfd679b.tar.xz |
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/linux/ceph')
-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(); } } |