mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-05 00:07:48 -04:00
virtio_config: clarify output parameters
This was ambiguous enough for a broken patch (206cc44588 ("virtio:
reject shm region if length is zero")) to make it into the kernel, so
make it clearer.
Link: https://lore.kernel.org/r/20250816071600-mutt-send-email-mst@kernel.org/
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Message-Id: <20250829150944.233505-1-hi@alyssa.is>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
committed by
Michael S. Tsirkin
parent
d6d673dd1e
commit
a05e4e935a
@@ -193,14 +193,15 @@ static inline bool virtio_has_feature(const struct virtio_device *vdev,
|
||||
}
|
||||
|
||||
static inline void virtio_get_features(struct virtio_device *vdev,
|
||||
u64 *features)
|
||||
u64 *features_out)
|
||||
{
|
||||
if (vdev->config->get_extended_features) {
|
||||
vdev->config->get_extended_features(vdev, features);
|
||||
vdev->config->get_extended_features(vdev, features_out);
|
||||
return;
|
||||
}
|
||||
|
||||
virtio_features_from_u64(features, vdev->config->get_features(vdev));
|
||||
virtio_features_from_u64(features_out,
|
||||
vdev->config->get_features(vdev));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -326,11 +327,11 @@ int virtqueue_set_affinity(struct virtqueue *vq, const struct cpumask *cpu_mask)
|
||||
|
||||
static inline
|
||||
bool virtio_get_shm_region(struct virtio_device *vdev,
|
||||
struct virtio_shm_region *region, u8 id)
|
||||
struct virtio_shm_region *region_out, u8 id)
|
||||
{
|
||||
if (!vdev->config->get_shm_region)
|
||||
return false;
|
||||
return vdev->config->get_shm_region(vdev, region, id);
|
||||
return vdev->config->get_shm_region(vdev, region_out, id);
|
||||
}
|
||||
|
||||
static inline bool virtio_is_little_endian(struct virtio_device *vdev)
|
||||
|
||||
Reference in New Issue
Block a user