diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2017-01-16 06:06:09 -0500 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-03-14 22:02:51 -0400 |
| commit | 290215a2abfd9c0ede35dfc753439ef61cfd679b (patch) | |
| tree | 66c2aff35678ce207b327ed703bf1b38a4409f38 /include/linux/ceph | |
| parent | ff3bcdc9b5f00809a18cc1a3ea42a72e00b1a895 (diff) | |
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) | |||
| 57 | case CEPH_POOL_TYPE_EC: | 57 | case CEPH_POOL_TYPE_EC: |
| 58 | return false; | 58 | return false; |
| 59 | default: | 59 | default: |
| 60 | BUG_ON(1); | 60 | BUG(); |
| 61 | } | 61 | } |
| 62 | } | 62 | } |
| 63 | 63 | ||
