From: Thomas Huth <thuth@redhat.com>
To: Cornelia Huck <cornelia.huck@de.ibm.com>, mst@redhat.com
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] virtio: avoid leading underscores for helpers
Date: Wed, 19 Aug 2015 14:38:25 -0700 [thread overview]
Message-ID: <55D4F751.5060208@redhat.com> (raw)
In-Reply-To: <1439804909-81783-1-git-send-email-cornelia.huck@de.ibm.com>
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_feature
> to virtio_vdev_has_feature.
>
> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
> ---
> 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)
>
> memcpy(&netcfg, config, n->config_size);
>
> - 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(NetClientState *nc)
> info->multicast_table = str_list;
> info->vlan_table = get_vlan_table(n);
>
> - if (!virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_VLAN)) {
> + if (!virtio_vdev_has_feature(vdev, VIRTIO_NET_F_CTRL_VLAN)) {
> info->vlan = RX_STATE_ALL;
> } else if (!info->vlan_table) {
> info->vlan = RX_STATE_NONE;
> @@ -529,13 +529,13 @@ static void virtio_net_set_features(VirtIODevice *vdev, uint64_t features)
> int i;
>
> virtio_net_set_multiqueue(n,
> - __virtio_has_feature(features, VIRTIO_NET_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 <thuth@redhat.com>
prev parent reply other threads:[~2015-08-19 21:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-17 9:48 [Qemu-devel] [PATCH v2] virtio: avoid leading underscores for helpers Cornelia Huck
2015-08-19 21:38 ` Thomas Huth [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55D4F751.5060208@redhat.com \
--to=thuth@redhat.com \
--cc=cornelia.huck@de.ibm.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.