summaryrefslogtreecommitdiff
path: root/include/linux/ceph/osdmap.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2017-01-16 12:06:09 +0100
committerIlya Dryomov <idryomov@gmail.com>2017-02-20 12:16:06 +0100
commitd24cdcd3e40a6825135498e11c20c7976b9bf545 (patch)
tree6ad455b6a3c86b968f47dfdc0b09321bbe9e9bff /include/linux/ceph/osdmap.h
parenteb65b919b914e65485fd8134912066f4fafc4f1e (diff)
downloadlwn-d24cdcd3e40a6825135498e11c20c7976b9bf545.tar.gz
lwn-d24cdcd3e40a6825135498e11c20c7976b9bf545.zip
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 <arnd@arndb.de> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'include/linux/ceph/osdmap.h')
-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 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();
}
}