Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+6 -8
+4 -4
drivers/block/virtio_blk.c
··· 1019 1019 static int init_vq(struct virtio_blk *vblk) 1020 1020 { 1021 1021 int err; 1022 - int i; 1022 + unsigned short i; 1023 1023 vq_callback_t **callbacks; 1024 1024 const char **names; 1025 1025 struct virtqueue **vqs; 1026 1026 unsigned short num_vqs; 1027 - unsigned int num_poll_vqs; 1027 + unsigned short num_poll_vqs; 1028 1028 struct virtio_device *vdev = vblk->vdev; 1029 1029 struct irq_affinity desc = { 0, }; 1030 1030 ··· 1068 1068 1069 1069 for (i = 0; i < num_vqs - num_poll_vqs; i++) { 1070 1070 callbacks[i] = virtblk_done; 1071 - snprintf(vblk->vqs[i].name, VQ_NAME_LEN, "req.%d", i); 1071 + snprintf(vblk->vqs[i].name, VQ_NAME_LEN, "req.%u", i); 1072 1072 names[i] = vblk->vqs[i].name; 1073 1073 } 1074 1074 1075 1075 for (; i < num_vqs; i++) { 1076 1076 callbacks[i] = NULL; 1077 - snprintf(vblk->vqs[i].name, VQ_NAME_LEN, "req_poll.%d", i); 1077 + snprintf(vblk->vqs[i].name, VQ_NAME_LEN, "req_poll.%u", i); 1078 1078 names[i] = vblk->vqs[i].name; 1079 1079 } 1080 1080
+2 -4
drivers/virtio/virtio_ring.c
··· 3219 3219 if (!vq->use_dma_api) 3220 3220 return; 3221 3221 3222 - dma_sync_single_range_for_cpu(dev, addr, offset, size, 3223 - DMA_BIDIRECTIONAL); 3222 + dma_sync_single_range_for_cpu(dev, addr, offset, size, dir); 3224 3223 } 3225 3224 EXPORT_SYMBOL_GPL(virtqueue_dma_sync_single_range_for_cpu); 3226 3225 ··· 3245 3246 if (!vq->use_dma_api) 3246 3247 return; 3247 3248 3248 - dma_sync_single_range_for_device(dev, addr, offset, size, 3249 - DMA_BIDIRECTIONAL); 3249 + dma_sync_single_range_for_device(dev, addr, offset, size, dir); 3250 3250 } 3251 3251 EXPORT_SYMBOL_GPL(virtqueue_dma_sync_single_range_for_device); 3252 3252