diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-01-16 12:06:09 +0100 |
---|---|---|
committer | Sasha Levin <alexander.levin@microsoft.com> | 2018-01-17 12:26:25 -0500 |
commit | 7c2b8b923b73a9977d044f031cbcf6257e226107 (patch) | |
tree | 625e42834f5bd1a0dfe718f3f2af32beed3ede1b /include | |
parent | 2c40db2389d1a839c2fd308d1295360e48822859 (diff) |
libceph: use BUG() instead of BUG_ON(1)
[ Upstream commit d24cdcd3e40a6825135498e11c20c7976b9bf545 ]
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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
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 e55c08bc3a96..0abc56140c83 100644 --- a/include/linux/ceph/osdmap.h +++ b/include/linux/ceph/osdmap.h @@ -49,7 +49,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(); } } |