[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [UNIKRAFT PATCH 1/2] plat/virtio: virtio_config_get returns >= 0
The 9pfs driver fails to get the configuration when the virtio_config_get returns a value greater than 0. The function description on virtio_config_get was incorrect. The patches changes the error check in the virtio-9p and the function description Signed-off-by: Sharan Santhanam <sharan.santhanam@xxxxxxxxx> --- plat/drivers/include/virtio/virtio_bus.h | 2 +- plat/drivers/virtio/virtio_9p.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plat/drivers/include/virtio/virtio_bus.h b/plat/drivers/include/virtio/virtio_bus.h index 56f0dafe..b3bb8331 100644 --- a/plat/drivers/include/virtio/virtio_bus.h +++ b/plat/drivers/include/virtio/virtio_bus.h @@ -240,7 +240,7 @@ static inline void virtio_feature_set(struct virtio_dev *vdev, __u32 feature) * @param type_len * The data type of the configuration data. * @return int - * 0, on successful reading the configuration space. + * >= 0, on successful reading the configuration space. * < 0, on error. */ static inline int virtio_config_get(struct virtio_dev *vdev, __u16 offset, diff --git a/plat/drivers/virtio/virtio_9p.c b/plat/drivers/virtio/virtio_9p.c index 045ce42f..7bd99b8d 100644 --- a/plat/drivers/virtio/virtio_9p.c +++ b/plat/drivers/virtio/virtio_9p.c @@ -347,7 +347,7 @@ static int virtio_9p_feature_negotiate(struct virtio_9p_device *d) if (virtio_config_get(d->vdev, __offsetof(struct virtio_9p_config, tag_len), - &tag_len, 1, sizeof(tag_len))) + &tag_len, 1, sizeof(tag_len)) < 0) { rc = -EAGAIN; goto out; -- 2.20.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |