aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-01-16 12:06:09 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-15 09:57:15 +0800
commit13ef90e1bb7963ec2fb9d3680fe418a4b7dedfa3 (patch)
tree6ba6a8f861cd2581daac1c0b5c032228b287c1a2
parent7952b6490bbce45e078c8c0e669df7a0a8f8948a (diff)
downloadlinux-linaro-stable-13ef90e1bb7963ec2fb9d3680fe418a4b7dedfa3.tar.gz
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>
-rw-r--r--include/linux/ceph/osdmap.h2
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();
}
}