From nobody Sun Feb 8 22:49:46 2026 Delivered-To: importer@patchew.org Received-SPF: none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1582204035; cv=none; d=zohomail.com; s=zohoarc; b=PG9p0uEMyYV4Wv/VIv2pD6z8bTb4BzC5/e1hb6LPvyZIAXXh8W/5Ts9Q1OPmre9sj7xZxTcV0+YsruTKIT1BliEYP04FsVR8ZMKwy0+vRS0eDadaLpoTa6x7poRpvfhEfRifSFU5xawwmMfS//ZZtNkfzUTYQQotW4AsES4kgkc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582204035; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=uZkHt3Ugo3MocGogQX3bOalCaKmHtTCkQApqzU+3V70=; b=RGiSfmpeUGF3ZDW9bkGml7JsuPujJGpCxFNLJ1xn8EJALHvKQ/w3u3ZNtRK/+dZwv9XK1FGZ7En8yD+7CAYohZWMveBFbk3q6IFlKK/Db5gf2+tQWt7GqDjw6mKU4Eo4XRJtMCyjqSOc0Mdefhfes5dOPWlWYKlITDdhpN04qjQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=none (zohomail.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1582204035488152.10568837859614; Thu, 20 Feb 2020 05:07:15 -0800 (PST) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j4lXT-0001XH-UK; Thu, 20 Feb 2020 13:06:47 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1j4lXS-0001VU-5D for xen-devel@lists.xenproject.org; Thu, 20 Feb 2020 13:06:46 +0000 Received: from us-smtp-1.mimecast.com (unknown [207.211.31.120]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id d8afad8b-53e1-11ea-8526-12813bfff9fa; Thu, 20 Feb 2020 13:06:45 +0000 (UTC) Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-291-f9u88GVKPEG3ckJu6nIfjQ-1; Thu, 20 Feb 2020 08:06:43 -0500 Received: by mail-wr1-f72.google.com with SMTP id s13so1704228wru.7 for ; Thu, 20 Feb 2020 05:06:43 -0800 (PST) Received: from localhost.localdomain (78.red-88-21-202.staticip.rima-tde.net. [88.21.202.78]) by smtp.gmail.com with ESMTPSA id b67sm4594690wmc.38.2020.02.20.05.06.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Feb 2020 05:06:41 -0800 (PST) X-Inumbo-ID: d8afad8b-53e1-11ea-8526-12813bfff9fa DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582204005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uVwVVeCugJs7pFiHvYs+kcICDXTPSCqBYYCEtvte3CI=; b=ev0u4fSYVUKmNRoJ8NvKdcw3O0r671WtNM6ZzRv8/729K0rp+x5Zc8/mXn9rE1GYA5eXnx JmKk1yS83SKVg5wi8QXsSc40PkpeNs66FQI0oPbhLhC714omVqAeI1kAQra/wYqrEroZHo S1frQDdgXnoZyidDSMJtsxwzKV5dgbQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=UKC5US0FVl1pIv+lPWy76t1kr1KKdCp1Se8AoBMs7qQ=; b=IkEF6wSpIGUaCN66kSP/2lb1KoU+vXmGjhmu0C2QX65fJoiWX6AhU7UsHCS2Y84VE+ u8V1oStI2vgXkIKvwanJJvO1Db88PG03U3INo9dpKVMFiSClowxSrhkgNdAXgzZ5G6jM YWHUUCZ6RkQCMc63ynT4Dyzj1/ZD31bEAp6TQQDL1WfVOQqziCIfz7QPacjhXC0rAEUX bjJ9sbynQ348YAzCO4Z0Ky34qBO3nnBNtlCY6ibY8dCVHztiQcOOLcTgTTVwMl68ENVH vHlZGUIhc9ILhvFH6fyjYOp9XA91HHe9PdBGfa3Jh02JsVfGSOLP3RdfT/OVD4LGCVNX aPwQ== X-Gm-Message-State: APjAAAWZFB8XtXaDaGFcR48pZtqUI6KUxMdeonUBUnep3/WmPOn8AZi3 uJI+K5sZP/g3izG07MgltWKLyA0VRApZxP1aXm2yxXgKlLaGYxLa9knclFxYWfL5dTwxTvOktg5 UKv6ama++W6HFAqWgbW4nS7oVNUw= X-Received: by 2002:a5d:4c84:: with SMTP id z4mr43731139wrs.423.1582204002778; Thu, 20 Feb 2020 05:06:42 -0800 (PST) X-Google-Smtp-Source: APXvYqwqHc8xSBLutdUhIzf/cdvh5+i6wOt8LjaLS6C9c63Yasey84Mhi4F8A6DvfBLGaafXEkCiSQ== X-Received: by 2002:a5d:4c84:: with SMTP id z4mr43731080wrs.423.1582204002528; Thu, 20 Feb 2020 05:06:42 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Peter Maydell , qemu-devel@nongnu.org Date: Thu, 20 Feb 2020 14:05:41 +0100 Message-Id: <20200220130548.29974-14-philmd@redhat.com> X-Mailer: git-send-email 2.21.1 In-Reply-To: <20200220130548.29974-1-philmd@redhat.com> References: <20200220130548.29974-1-philmd@redhat.com> MIME-Version: 1.0 X-MC-Unique: f9u88GVKPEG3ckJu6nIfjQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [Xen-devel] [PATCH v3 13/20] hw/virtio: Let virtqueue_map_iovec() use a boolean 'is_write' argument X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Dmitry Fleytman , kvm@vger.kernel.org, "Michael S. Tsirkin" , Jason Wang , Gerd Hoffmann , "Edgar E. Iglesias" , Stefano Stabellini , Matthew Rosato , qemu-block@nongnu.org, David Hildenbrand , Halil Pasic , Christian Borntraeger , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Marcel Apfelbaum , Anthony Perard , xen-devel@lists.xenproject.org, Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier , Thomas Huth , Eduardo Habkost , Stefan Weil , Alistair Francis , Richard Henderson , Paul Durrant , Eric Auger , qemu-s390x@nongnu.org, qemu-arm@nongnu.org, =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , John Snow , David Gibson , Igor Mitsyanko , Cornelia Huck , Michael Walle , qemu-ppc@nongnu.org, Paolo Bonzini Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) The 'is_write' argument is either 0 or 1. Convert it to a boolean type. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/virtio/virtio.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 2c5410e981..9d06dbe3ef 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -1293,7 +1293,7 @@ static void virtqueue_undo_map_desc(unsigned int out_= num, unsigned int in_num, =20 static void virtqueue_map_iovec(VirtIODevice *vdev, struct iovec *sg, hwaddr *addr, unsigned int num_sg, - int is_write) + bool is_write) { unsigned int i; hwaddr len; @@ -1317,8 +1317,9 @@ static void virtqueue_map_iovec(VirtIODevice *vdev, s= truct iovec *sg, =20 void virtqueue_map(VirtIODevice *vdev, VirtQueueElement *elem) { - virtqueue_map_iovec(vdev, elem->in_sg, elem->in_addr, elem->in_num, 1); - virtqueue_map_iovec(vdev, elem->out_sg, elem->out_addr, elem->out_num,= 0); + virtqueue_map_iovec(vdev, elem->in_sg, elem->in_addr, elem->in_num, tr= ue); + virtqueue_map_iovec(vdev, elem->out_sg, elem->out_addr, elem->out_num, + fa= lse); } =20 static void *virtqueue_alloc_element(size_t sz, unsigned out_num, unsigned= in_num) --=20 2.21.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel