mac80211: use a structure to hold the mesh config information element
[safe/jmp/linux-2.6] / include / linux / virtio_config.h
index 4cd290c..0093dd7 100644 (file)
@@ -79,8 +79,7 @@
  *     the dev->feature bits if it wants.
  */
 typedef void vq_callback_t(struct virtqueue *);
-struct virtio_config_ops
-{
+struct virtio_config_ops {
        void (*get)(struct virtio_device *vdev, unsigned offset,
                    void *buf, unsigned len);
        void (*set)(struct virtio_device *vdev, unsigned offset,
@@ -110,10 +109,11 @@ static inline bool virtio_has_feature(const struct virtio_device *vdev,
                                      unsigned int fbit)
 {
        /* Did you forget to fix assumptions on max features? */
-       if (__builtin_constant_p(fbit))
-               BUILD_BUG_ON(fbit >= 32);
+       MAYBE_BUILD_BUG_ON(fbit >= 32);
+
+       if (fbit < VIRTIO_TRANSPORT_F_START)
+               virtio_check_driver_offered_feature(vdev, fbit);
 
-       virtio_check_driver_offered_feature(vdev, fbit);
        return test_bit(fbit, vdev->features);
 }