Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966629AbbDWR0Z (ORCPT ); Thu, 23 Apr 2015 13:26:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54655 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966240AbbDWR0V (ORCPT ); Thu, 23 Apr 2015 13:26:21 -0400 Date: Thu, 23 Apr 2015 19:26:13 +0200 From: Thomas Huth To: Greg Kurz Cc: Rusty Russell , "Michael S. Tsirkin" , Cornelia Huck , linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH v5 1/8] virtio: introduce virtio_is_little_endian() helper Message-ID: <20150423192613.6c58042f@thh440s> In-Reply-To: <20150423192215.12182311@thh440s> References: <20150423152608.11795.4373.stgit@bahia.local> <20150423152617.11795.13272.stgit@bahia.local> <20150423192215.12182311@thh440s> Organization: Red Hat MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1395 Lines: 38 Am Thu, 23 Apr 2015 19:22:15 +0200 schrieb Thomas Huth : > Am Thu, 23 Apr 2015 17:26:20 +0200 > schrieb Greg Kurz : > > > Signed-off-by: Greg Kurz > > --- > > include/linux/virtio_config.h | 17 +++++++++++------ > > 1 file changed, 11 insertions(+), 6 deletions(-) > > > > diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h > > index ca3ed78..bd1a582 100644 > > --- a/include/linux/virtio_config.h > > +++ b/include/linux/virtio_config.h > > @@ -205,35 +205,40 @@ int virtqueue_set_affinity(struct virtqueue *vq, int cpu) > > return 0; > > } > > > > +static inline bool virtio_is_little_endian(struct virtio_device *vdev) > > +{ > > + return virtio_has_feature(vdev, VIRTIO_F_VERSION_1); > > +} > > So this function returns false when _not_ using version 1, but running > on a little endian host + guest? Sounds confusing. Maybe you could name > it "virtio_is_v1()" or so instead? Ah, never mind, I should have looked at patch 6 first, then it makes sense. (maybe you could put a note to the later patch in this patch description?) Thomas -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/