mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
21ea9fb69e
commit
f7ad26ff95
13 changed files with 14 additions and 14 deletions
|
@ -170,7 +170,7 @@ static int virtinput_init_vqs(struct virtio_input *vi)
|
|||
struct virtqueue *vqs[2];
|
||||
vq_callback_t *cbs[] = { virtinput_recv_events,
|
||||
virtinput_recv_status };
|
||||
static const char *names[] = { "events", "status" };
|
||||
static const char * const names[] = { "events", "status" };
|
||||
int err;
|
||||
|
||||
err = vi->vdev->config->find_vqs(vi->vdev, 2, vqs, cbs, names);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue