On Fri, 5 Feb 2016 12:33:44 +0100
Cornelia Huck <cornelia.h...@de.ibm.com> wrote:

> On Fri, 05 Feb 2016 11:43:11 +0100
> Greg Kurz <gk...@linux.vnet.ibm.com> wrote:
> 
> > +static bool virtio_net_set_vnet_endian(VirtIODevice *vdev, NetClientState 
> > *ncs,
> > +                                       int queues, bool enable)  
> 
> You might consider adding a comment like "returns whether endianness
> handling needs to fall back to the device" or so, as it's not
> immediately obvious what true/false is supposed to mean. But the patch
> is fine.
> 

I agree it is not that obvious. If Michael agrees, I'll send a followup
patch when these series has been applied.

Thanks.

--
Greg

> > +{
> > +    int i;
> > +
> > +    for (i = 0; i < queues; i++) {
> > +        if (virtio_net_set_vnet_endian_one(vdev, ncs[i].peer, enable) < 0 
> > &&
> > +            enable) {
> > +            while (--i >= 0) {
> > +                virtio_net_set_vnet_endian_one(vdev, ncs[i].peer, false);
> > +            }
> > +
> > +            return true;
> > +        }
> > +    }
> > +
> > +    return false;
> > +}  


Reply via email to