[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] vhost-user: pass message as a pointer to proces
From: |
Jens Freimann |
Subject: |
Re: [Qemu-devel] [PATCH] vhost-user: pass message as a pointer to process_message_reply() |
Date: |
Wed, 24 May 2017 10:50:59 +0200 |
User-agent: |
NeoMutt/20170428 (1.8.2) |
On Wed, May 24, 2017 at 10:42:30AM +0200, Maxime Coquelin wrote:
>
>
> On 05/24/2017 10:40 AM, Marc-André Lureau wrote:
> >
> >
> > On Wed, May 24, 2017 at 11:35 AM Maxime Coquelin
> > <address@hidden <mailto:address@hidden>> wrote:
> >
> > process_message_reply() was recently updated to get full message
> > content instead of only its request field.
> >
> > There is no need to copy all the struct content into the stack,
> > so just pass its pointer.
> >
> > Cc: Zhiyong Yang <address@hidden
> > <mailto:address@hidden>>
> > Fixes: 60cd11024f41 ("hw/virtio: fix vhost user fails to startup
> > when MQ")
> > Signed-off-by: Maxime Coquelin <address@hidden
> > <mailto:address@hidden>>
> > ---
> > hw/virtio/vhost-user.c | 12 ++++++------
> > 1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c
> > index b87a176..baf2487 100644
> > --- a/hw/virtio/vhost-user.c
> > +++ b/hw/virtio/vhost-user.c
> > @@ -162,11 +162,11 @@ fail:
> > }
> >
> > static int process_message_reply(struct vhost_dev *dev,
> > - VhostUserMsg msg)
> > + VhostUserMsg *msg)
> >
> >
> > Can you make it const?
> Sure!
with that:
Reviewed-by: Jens Freimann <address@hidden>