diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2015-12-17 03:53:43 -0500 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2016-01-12 13:47:06 -0500 |
commit | f7ad26ff952b3ca2702d7da03aad0ab1f6c01d7c (patch) | |
tree | 37022c77c1ac3d3bcc0e6f74f9ea2588ac30701b /drivers/virtio/virtio_pci_common.c | |
parent | 21ea9fb69e7c4b1b1559c3e410943d3ff248ffcb (diff) |
virtio: make find_vqs() checkpatch.pl-friendly
checkpatch.pl wants arrays of strings declared as follows:
static const char * const names[] = { "vq-1", "vq-2", "vq-3" };
Currently the find_vqs() function takes a const char *names[] argument
so passing checkpatch.pl's const char * const names[] results in a
compiler error due to losing the second const.
This patch adjusts the find_vqs() prototype and updates all virtio
transports. This makes it possible for virtio_balloon.c, virtio_input.c,
virtgpu_kms.c, and virtio_rpmsg_bus.c to use the checkpatch.pl-friendly
type.
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Diffstat (limited to 'drivers/virtio/virtio_pci_common.c')
-rw-r--r-- | drivers/virtio/virtio_pci_common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c index 78f804af6c20..36205c27c4d0 100644 --- a/drivers/virtio/virtio_pci_common.c +++ b/drivers/virtio/virtio_pci_common.c | |||
@@ -296,7 +296,7 @@ void vp_del_vqs(struct virtio_device *vdev) | |||
296 | static int vp_try_to_find_vqs(struct virtio_device *vdev, unsigned nvqs, | 296 | static int vp_try_to_find_vqs(struct virtio_device *vdev, unsigned nvqs, |
297 | struct virtqueue *vqs[], | 297 | struct virtqueue *vqs[], |
298 | vq_callback_t *callbacks[], | 298 | vq_callback_t *callbacks[], |
299 | const char *names[], | 299 | const char * const names[], |
300 | bool use_msix, | 300 | bool use_msix, |
301 | bool per_vq_vectors) | 301 | bool per_vq_vectors) |
302 | { | 302 | { |
@@ -376,7 +376,7 @@ error_find: | |||
376 | int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, | 376 | int vp_find_vqs(struct virtio_device *vdev, unsigned nvqs, |
377 | struct virtqueue *vqs[], | 377 | struct virtqueue *vqs[], |
378 | vq_callback_t *callbacks[], | 378 | vq_callback_t *callbacks[], |
379 | const char *names[]) | 379 | const char * const names[]) |
380 | { | 380 | { |
381 | int err; | 381 | int err; |
382 | 382 | ||