Received: from eggs.gnu.org ([2001:4830:134:3::10]:48904) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpeKh-0001z1-OW for qemu-devel@nongnu.org; Tue, 05 May 2015 11:00:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YpeKb-00069f-PI for qemu-devel@nongnu.org; Tue, 05 May 2015 11:00:27 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:59128) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YpeKb-00069G-GM for qemu-devel@nongnu.org; Tue, 05 May 2015 11:00:21 -0400 Received: from /spool/local by e06smtp10.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 5 May 2015 16:00:20 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 7CCC2219004D for ; Tue, 5 May 2015 16:00:00 +0100 (BST) Received: from d06av03.portsmouth.uk.ibm.com (d06av03.portsmouth.uk.ibm.com [9.149.37.213]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t45F0IPN131416 for ; Tue, 5 May 2015 15:00:18 GMT Received: from d06av03.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av03.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t45F0H5x009485 for ; Tue, 5 May 2015 09:00:17 -0600 From: Cornelia Huck Date: Tue, 5 May 2015 17:00:11 +0200 Message-Id: <1430838011-19843-4-git-send-email-cornelia.huck@de.ibm.com> In-Reply-To: <1430838011-19843-1-git-send-email-cornelia.huck@de.ibm.com> References: <1430838011-19843-1-git-send-email-cornelia.huck@de.ibm.com> Subject: [Qemu-devel] [PATCH 3/3] virtio: rename __virtio_set_features List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mst@redhat.com Cc: Cornelia Huck , qemu-devel@nongnu.org We want to avoid reserved leading underscores, so let's call the function virtio_set_features_nocheck() instead. updates "virtio: disallow late feature changes for virtio-1" Signed-off-by: Cornelia Huck --- hw/virtio/virtio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 567c65c..7bd7339 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -1082,7 +1082,7 @@ void virtio_save(VirtIODevice *vdev, QEMUFile *f) vmstate_save_state(f, &vmstate_virtio, vdev, NULL); } -static int __virtio_set_features(VirtIODevice *vdev, uint64_t val) +static int virtio_set_features_nocheck(VirtIODevice *vdev, uint64_t val) { BusState *qbus = qdev_get_parent_bus(DEVICE(vdev)); VirtioBusClass *vbusk = VIRTIO_BUS_GET_CLASS(qbus); @@ -1107,7 +1107,7 @@ int virtio_set_features(VirtIODevice *vdev, uint64_t val) if (vdev->status & VIRTIO_CONFIG_S_FEATURES_OK) { return -EINVAL; } - return __virtio_set_features(vdev, val); + return virtio_set_features_nocheck(vdev, val); } bool virtio_version_1_capable(VirtIODevice *vdev, uint64_t host_features) @@ -1159,7 +1159,7 @@ int virtio_load(VirtIODevice *vdev, QEMUFile *f, int version_id) //} features = (((uint64_t)features_hi) << 32) | features_lo; - if (__virtio_set_features(vdev, features) < 0) { + if (virtio_set_features_nocheck(vdev, features) < 0) { supported_features = k->get_features(qbus->parent); error_report("Features 0x%"PRIx64" unsupported. Allowed features: 0x%"PRIx64, features, supported_features); -- 2.4.0