Skip to content

Commit af7c1be

Browse files
Baoyou Xiemstsirkin
authored andcommitted
virtio: mark vring_dma_dev() static
We get 1 warning when building kernel with W=1: drivers/virtio/virtio_ring.c:170:16: warning: no previous prototype for 'vring_dma_dev' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. so this patch marks this function with 'static'. Signed-off-by: Baoyou Xie <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
1 parent 3eab887 commit af7c1be

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/virtio/virtio_ring.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ static bool vring_use_dma_api(struct virtio_device *vdev)
167167
* making all of the arch DMA ops work on the vring device itself
168168
* is a mess. For now, we use the parent device for DMA ops.
169169
*/
170-
struct device *vring_dma_dev(const struct vring_virtqueue *vq)
170+
static struct device *vring_dma_dev(const struct vring_virtqueue *vq)
171171
{
172172
return vq->vq.vdev->dev.parent;
173173
}

0 commit comments

Comments
 (0)