From: Arnd Bergmann Date: Mon, 16 Jan 2017 11:06:09 +0000 (+0100) Subject: libceph: use BUG() instead of BUG_ON(1) X-Git-Tag: v4.11-rc1~47^2~42 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d24cdcd3e40a6825135498e11c20c7976b9bf545;p=platform%2Fkernel%2Flinux-exynos.git libceph: use BUG() instead of BUG_ON(1) 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 Signed-off-by: Ilya Dryomov --- diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h index 9a90417..4129066 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(); } }