Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d24cdcd3 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Ilya Dryomov
Browse files

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: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent eb65b919
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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();
	}
}