···9696 return test_bit(fbit, vdev->features);9797}98989999-/**100100- * virtio_config_val - look for a feature and get a virtio config entry.101101- * @vdev: the virtio device102102- * @fbit: the feature bit103103- * @offset: the type to search for.104104- * @v: a pointer to the value to fill in.105105- *106106- * The return value is -ENOENT if the feature doesn't exist. Otherwise107107- * the config value is copied into whatever is pointed to by v. */108108-#define virtio_config_val(vdev, fbit, offset, v) \109109- virtio_config_buf((vdev), (fbit), (offset), (v), sizeof(*v))110110-111111-#define virtio_config_val_len(vdev, fbit, offset, v, len) \112112- virtio_config_buf((vdev), (fbit), (offset), (v), (len))113113-114114-static inline int virtio_config_buf(struct virtio_device *vdev,115115- unsigned int fbit,116116- unsigned int offset,117117- void *buf, unsigned len)118118-{119119- if (!virtio_has_feature(vdev, fbit))120120- return -ENOENT;121121-122122- vdev->config->get(vdev, offset, buf, len);123123- return 0;124124-}125125-12699static inline127100struct virtqueue *virtio_find_single_vq(struct virtio_device *vdev,128101 vq_callback_t *c, const char *n)