Skip to content

Commit

Permalink
virtio: fix virtqueue callback typedef
Browse files Browse the repository at this point in the history
Fix declaration of the the function pointer type.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
  • Loading branch information
arnopo committed Jan 9, 2020
1 parent 79db4c2 commit 02de62c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/include/openamp/rpmsg_virtio.h
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion lib/include/openamp/virtio.h
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions lib/include/openamp/virtqueue.h
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion lib/rpmsg/rpmsg_virtio.c
Expand Up @@ -518,7 +518,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;

Expand Down
2 changes: 1 addition & 1 deletion lib/virtio/virtio.c
Expand Up @@ -82,7 +82,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;
Expand Down

0 comments on commit 02de62c

Please sign in to comment.