From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56528) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz4kX-0006SY-4Z for qemu-devel@nongnu.org; Thu, 11 Dec 2014 09:29:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xz4kK-0005KL-1h for qemu-devel@nongnu.org; Thu, 11 Dec 2014 09:29:49 -0500 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:57366) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xz4kJ-0005Ju-NN for qemu-devel@nongnu.org; Thu, 11 Dec 2014 09:29:35 -0500 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 11 Dec 2014 14:29:34 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 575D217D8047 for ; Thu, 11 Dec 2014 14:29:54 +0000 (GMT) Received: from d06av07.portsmouth.uk.ibm.com (d06av07.portsmouth.uk.ibm.com [9.149.37.248]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id sBBETVx358392590 for ; Thu, 11 Dec 2014 14:29:31 GMT Received: from d06av07.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av07.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id sBBETU8e005488 for ; Thu, 11 Dec 2014 09:29:31 -0500 Date: Thu, 11 Dec 2014 15:29:29 +0100 From: Thomas Huth Message-ID: <20141211152929.60145e2d@oc7435384737.ibm.com> In-Reply-To: <1418304322-7546-4-git-send-email-cornelia.huck@de.ibm.com> References: <1418304322-7546-1-git-send-email-cornelia.huck@de.ibm.com> <1418304322-7546-4-git-send-email-cornelia.huck@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH RFC v6 03/20] virtio: feature bit manipulation helpers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck Cc: rusty@rustcorp.com.au, mst@redhat.com, qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org On Thu, 11 Dec 2014 14:25:05 +0100 Cornelia Huck wrote: > Add virtio_{add,clear}_feature helper functions for manipulating a > feature bits variable. This has some benefits over open coding: > - add check that the bit is in a sane range > - make it obvious at a glance what is going on > - have a central point to change when we want to extend feature bits > > Convert existing code manipulating features to use the new helpers. > > Signed-off-by: Cornelia Huck > --- > hw/9pfs/virtio-9p-device.c | 2 +- > hw/block/virtio-blk.c | 16 ++++++++-------- > hw/char/virtio-serial-bus.c | 2 +- > hw/net/virtio-net.c | 34 +++++++++++++++++----------------- > hw/s390x/virtio-ccw.c | 4 ++-- > hw/virtio/virtio-mmio.c | 2 +- > hw/virtio/virtio-pci.c | 4 ++-- > include/hw/virtio/virtio.h | 12 ++++++++++++ > 8 files changed, 44 insertions(+), 32 deletions(-) Patch looks fine to me. Reviewed-by: Thomas Huth