virtio: fix virtqueue callback typedef

Fix declaration of the the function pointer type reported
by checkpatch tool.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
This commit is contained in:
Arnaud Pouliquen
2020-01-06 17:59:23 +01:00
parent b8bc3b7122
commit ef7cf424a8
5 changed files with 6 additions and 6 deletions

View File

@@ -89,7 +89,7 @@ static inline int
rpmsg_virtio_create_virtqueues(struct rpmsg_virtio_device *rvdev,
int flags, unsigned int nvqs,
const char *names[],
vq_callback *callbacks[])
vq_callback *callbacks)
{
return virtio_create_virtqueues(rvdev->vdev, flags, nvqs, names,
callbacks);

View File

@@ -141,7 +141,7 @@ struct virtio_dispatch {
int virtio_create_virtqueues(struct virtio_device *vdev, unsigned int flags,
unsigned int nvqs, const char *names[],
vq_callback *callbacks[]);
vq_callback callbacks[]);
#if defined __cplusplus
}

View File

@@ -109,8 +109,8 @@ struct vring_alloc_info {
uint16_t pad;
};
typedef void vq_callback(struct virtqueue *);
typedef void vq_notify(struct virtqueue *);
typedef void (*vq_callback)(struct virtqueue *);
typedef void (*vq_notify)(struct virtqueue *);
#ifdef VQUEUE_DEBUG
#include <metal/log.h>

View File

@@ -519,7 +519,7 @@ int rpmsg_init_vdev(struct rpmsg_virtio_device *rvdev,
{
struct rpmsg_device *rdev;
const char *vq_names[RPMSG_NUM_VRINGS];
vq_callback *callback[RPMSG_NUM_VRINGS];
vq_callback callback[RPMSG_NUM_VRINGS];
int status;
unsigned int i, role;

View File

@@ -85,7 +85,7 @@ void virtio_describe(struct virtio_device *dev, const char *msg,
int virtio_create_virtqueues(struct virtio_device *vdev, unsigned int flags,
unsigned int nvqs, const char *names[],
vq_callback *callbacks[])
vq_callback callbacks[])
{
struct virtio_vring_info *vring_info;
struct vring_alloc_info *vring_alloc;