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/rpmsg | |
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/rpmsg')
-rw-r--r-- | drivers/rpmsg/virtio_rpmsg_bus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c index 73354ee27877..1fcd27c1f183 100644 --- a/drivers/rpmsg/virtio_rpmsg_bus.c +++ b/drivers/rpmsg/virtio_rpmsg_bus.c | |||
@@ -945,7 +945,7 @@ static void rpmsg_ns_cb(struct rpmsg_channel *rpdev, void *data, int len, | |||
945 | static int rpmsg_probe(struct virtio_device *vdev) | 945 | static int rpmsg_probe(struct virtio_device *vdev) |
946 | { | 946 | { |
947 | vq_callback_t *vq_cbs[] = { rpmsg_recv_done, rpmsg_xmit_done }; | 947 | vq_callback_t *vq_cbs[] = { rpmsg_recv_done, rpmsg_xmit_done }; |
948 | const char *names[] = { "input", "output" }; | 948 | static const char * const names[] = { "input", "output" }; |
949 | struct virtqueue *vqs[2]; | 949 | struct virtqueue *vqs[2]; |
950 | struct virtproc_info *vrp; | 950 | struct virtproc_info *vrp; |
951 | void *bufs_va; | 951 | void *bufs_va; |