Remove MAYBE_BUILD_BUG_ON
Now BUILD_BUG_ON() can handle optimizable constants, we don't need MAYBE_BUILD_BUG_ON any more. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@ -109,7 +109,10 @@ static inline bool virtio_has_feature(const struct virtio_device *vdev,
|
||||
unsigned int fbit)
|
||||
{
|
||||
/* Did you forget to fix assumptions on max features? */
|
||||
MAYBE_BUILD_BUG_ON(fbit >= 32);
|
||||
if (__builtin_constant_p(fbit))
|
||||
BUILD_BUG_ON(fbit >= 32);
|
||||
else
|
||||
BUG_ON(fbit >= 32);
|
||||
|
||||
if (fbit < VIRTIO_TRANSPORT_F_START)
|
||||
virtio_check_driver_offered_feature(vdev, fbit);
|
||||
|
Reference in New Issue
Block a user