mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 15:03:52 +08:00
Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Pull virtio fixes from Michael Tsirkin: "A couple of bugfixes: one for a regression" * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: virtio_blk: fix snprintf truncation compiler warning virtio_ring: fix syncs DMA memory with different direction
This commit is contained in:
@@ -1019,12 +1019,12 @@ static void virtblk_config_changed(struct virtio_device *vdev)
|
||||
static int init_vq(struct virtio_blk *vblk)
|
||||
{
|
||||
int err;
|
||||
int i;
|
||||
unsigned short i;
|
||||
vq_callback_t **callbacks;
|
||||
const char **names;
|
||||
struct virtqueue **vqs;
|
||||
unsigned short num_vqs;
|
||||
unsigned int num_poll_vqs;
|
||||
unsigned short num_poll_vqs;
|
||||
struct virtio_device *vdev = vblk->vdev;
|
||||
struct irq_affinity desc = { 0, };
|
||||
|
||||
@@ -1068,13 +1068,13 @@ static int init_vq(struct virtio_blk *vblk)
|
||||
|
||||
for (i = 0; i < num_vqs - num_poll_vqs; i++) {
|
||||
callbacks[i] = virtblk_done;
|
||||
snprintf(vblk->vqs[i].name, VQ_NAME_LEN, "req.%d", i);
|
||||
snprintf(vblk->vqs[i].name, VQ_NAME_LEN, "req.%u", i);
|
||||
names[i] = vblk->vqs[i].name;
|
||||
}
|
||||
|
||||
for (; i < num_vqs; i++) {
|
||||
callbacks[i] = NULL;
|
||||
snprintf(vblk->vqs[i].name, VQ_NAME_LEN, "req_poll.%d", i);
|
||||
snprintf(vblk->vqs[i].name, VQ_NAME_LEN, "req_poll.%u", i);
|
||||
names[i] = vblk->vqs[i].name;
|
||||
}
|
||||
|
||||
|
||||
@@ -3219,8 +3219,7 @@ void virtqueue_dma_sync_single_range_for_cpu(struct virtqueue *_vq,
|
||||
if (!vq->use_dma_api)
|
||||
return;
|
||||
|
||||
dma_sync_single_range_for_cpu(dev, addr, offset, size,
|
||||
DMA_BIDIRECTIONAL);
|
||||
dma_sync_single_range_for_cpu(dev, addr, offset, size, dir);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(virtqueue_dma_sync_single_range_for_cpu);
|
||||
|
||||
@@ -3246,8 +3245,7 @@ void virtqueue_dma_sync_single_range_for_device(struct virtqueue *_vq,
|
||||
if (!vq->use_dma_api)
|
||||
return;
|
||||
|
||||
dma_sync_single_range_for_device(dev, addr, offset, size,
|
||||
DMA_BIDIRECTIONAL);
|
||||
dma_sync_single_range_for_device(dev, addr, offset, size, dir);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(virtqueue_dma_sync_single_range_for_device);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user