From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51971) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSB47-0007Zw-E2 for qemu-devel@nongnu.org; Wed, 19 Aug 2015 17:38:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZSB43-00065p-UO for qemu-devel@nongnu.org; Wed, 19 Aug 2015 17:38:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37105) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZSB43-00064H-IO for qemu-devel@nongnu.org; Wed, 19 Aug 2015 17:38:31 -0400 Message-ID: <55D4F751.5060208@redhat.com> Date: Wed, 19 Aug 2015 14:38:25 -0700 From: Thomas Huth MIME-Version: 1.0 References: <1439804909-81783-1-git-send-email-cornelia.huck@de.ibm.com> In-Reply-To: <1439804909-81783-1-git-send-email-cornelia.huck@de.ibm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2] virtio: avoid leading underscores for helpers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck , mst@redhat.com Cc: qemu-devel@nongnu.org On 17/08/15 02:48, Cornelia Huck wrote: > Commit ef546f1275f6563e8934dd5e338d29d9f9909ca6 ("virtio: add > feature checking helpers") introduced a helper __virtio_has_feature. > We don't want to use reserved identifiers, though, so let's > rename __virtio_has_feature to virtio_has_feature and virtio_has_featur= e > to virtio_vdev_has_feature. >=20 > Signed-off-by: Cornelia Huck > --- > hw/block/virtio-blk.c | 7 ++++--- > hw/char/virtio-serial-bus.c | 2 +- > hw/net/vhost_net.c | 2 +- > hw/net/virtio-net.c | 31 ++++++++++++++++--------------- > hw/scsi/virtio-scsi.c | 8 ++++---- > hw/virtio/dataplane/vring.c | 10 +++++----- > hw/virtio/vhost.c | 4 ++-- > hw/virtio/virtio-balloon.c | 2 +- > hw/virtio/virtio.c | 14 +++++++------- > include/hw/virtio/virtio-access.h | 2 +- > include/hw/virtio/virtio.h | 11 ++++++----- > 11 files changed, 48 insertions(+), 45 deletions(-) ... > diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c > index 8d28e45..f72eebf 100644 > --- a/hw/net/virtio-net.c > +++ b/hw/net/virtio-net.c > @@ -86,8 +86,8 @@ static void virtio_net_set_config(VirtIODevice *vdev,= const uint8_t *config) > =20 > memcpy(&netcfg, config, n->config_size); > =20 > - if (!virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_MAC_ADDR) && > - !virtio_has_feature(vdev, VIRTIO_F_VERSION_1) && > + if (!virtio_vdev_has_feature(vdev, VIRTIO_NET_F_CTRL_MAC_ADDR) && > + !virtio_vdev_has_feature(vdev, VIRTIO_F_VERSION_1) && > memcmp(netcfg.mac, n->mac, ETH_ALEN)) { > memcpy(n->mac, netcfg.mac, ETH_ALEN); > qemu_format_nic_info_str(qemu_get_queue(n->nic), n->mac); > @@ -304,7 +304,7 @@ static RxFilterInfo *virtio_net_query_rxfilter(NetC= lientState *nc) > info->multicast_table =3D str_list; > info->vlan_table =3D get_vlan_table(n); > =20 > - if (!virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_VLAN)) { > + if (!virtio_vdev_has_feature(vdev, VIRTIO_NET_F_CTRL_VLAN)) { > info->vlan =3D RX_STATE_ALL; > } else if (!info->vlan_table) { > info->vlan =3D RX_STATE_NONE; > @@ -529,13 +529,13 @@ static void virtio_net_set_features(VirtIODevice = *vdev, uint64_t features) > int i; > =20 > virtio_net_set_multiqueue(n, > - __virtio_has_feature(features, VIRTIO_NE= T_F_MQ)); > + virtio_has_feature(features, VIRTIO_NET_= F_MQ)); Could this fit now into one line? Anyway, patch still looks fine to me, so: Reviewed-by: Thomas Huth