From nobody Fri Dec 19 07:15:32 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1621509007; cv=none; d=zohomail.com; s=zohoarc; b=gZ9OI29LlhSg17T6iBiayHEb0T1BC0rNW5IysPqMBGAdPLC7gA10CjlJQ982iH9qorUTFf7mdV5r4lAd33aIe9z2T5DOh+/zHDsVNRPH3uLNxNUmuiIcns/yFvXkjkgotr9aBQzllfYjh7y+KoHgTKhPfnI9SQqnO51J8iS7fZg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621509007; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=S06OJbLcsLoisVvd+3p+23m8ISoQC7YgJjRfb76l+Q8=; b=ItbBdlT3vBcP6EHm0GPuWgMg51kOanAf4fjpB+8ZPiQL8GVAIhqZp27IVmsxwVL505aQ2Q9HZeLwXjjEcK9OWcurYTMFoXWzG6vpOinm512RfOqvdTgx1VyzTMGXUhXDlVZZvHJ5clx2iOaHHNLqJ2mORqO9Aorqpv1Hoey8k4U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1621509007468284.3098123891566; Thu, 20 May 2021 04:10:07 -0700 (PDT) Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-547-SUPynbbtPvmef_BKOeMzrA-1; Thu, 20 May 2021 07:10:02 -0400 Received: by mail-wr1-f70.google.com with SMTP id c13-20020a5d6ccd0000b029010ec741b84bso8490720wrc.23 for ; Thu, 20 May 2021 04:10:02 -0700 (PDT) Return-Path: Return-Path: Received: from x1w.redhat.com (31.red-83-51-215.dynamicip.rima-tde.net. [83.51.215.31]) by smtp.gmail.com with ESMTPSA id r7sm2094567wmq.18.2021.05.20.04.10.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 May 2021 04:10:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621509006; 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=S06OJbLcsLoisVvd+3p+23m8ISoQC7YgJjRfb76l+Q8=; b=SNG4mxs6QtRgojCgXjvyeq7l4LXrlv3USsbn4wqxnROAUroz9+netzvUW2Oh42Aee9+Qh8 A7mqaUx2eD4zacZ/RUo7HAv3cAkFDowmnXai9VEeky0aFWgnYwoQnReLgjo2kFZoZ36RjI 38r7WTy8OVl3rxesSfh9hoV5UCYe7a0= X-MC-Unique: SUPynbbtPvmef_BKOeMzrA-1 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=S06OJbLcsLoisVvd+3p+23m8ISoQC7YgJjRfb76l+Q8=; b=nU0faGjlEmrKufyvDyBCO/9l6UtVXextSmQyZE9lff7FEX6HaNIIKLRUr6kWlsOcPo j4+7wzz5X02fv+Ob51l2hxLGWqUTN5VmARxoD1RwLQ5MN992Q71ffr467iTO/FkDVGBH tFra/bTbQDI4O0oqdGbTs3MoBJspuG4XNFZEHTtF14Y1jGXKjbqrqpo4R8rA6egTHtt8 OEci26A+vC/xw30JoQvhcma98YSwfCMVlZrvTZcJWQHYNMx1RPU5DmXmqxSCwO3ppOvE v7M+jWbLx+/lWST/3Zv9Orhjftx/nJze0u7q+qiusEO1KeDBd2jaJ2Uyg4crZWV81uEI RXfg== X-Gm-Message-State: AOAM533SRtZh8LvGnUGprPAb2xGuA9mkJAh/Z6zw4r467B0sBJeO+MtU e7pBnOFtCrNhp1m+dl2HYc0EZ6W+OUoIPWdPPVAGUTirA2NHvfWcunXm97MAfg7tsfxh6aUM2zT VV27gjOzyxScDYg== X-Received: by 2002:a05:6000:1286:: with SMTP id f6mr3585450wrx.226.1621509001831; Thu, 20 May 2021 04:10:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBTw1FpHwB4pwErnBQjO1DZafXorcKIJrnaoUYt/FQiRqv9609/jjGwfr6axovpAJfHyEdgQ== X-Received: by 2002:a05:6000:1286:: with SMTP id f6mr3585439wrx.226.1621509001703; Thu, 20 May 2021 04:10:01 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , Stefan Hajnoczi , Peter Maydell , Peter Xu , Paolo Bonzini , Richard Henderson , Bibo Mao , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [RFC PATCH 09/12] hw/virtio: Use correct type sizes Date: Thu, 20 May 2021 13:09:16 +0200 Message-Id: <20210520110919.2483190-10-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210520110919.2483190-1-philmd@redhat.com> References: <20210520110919.2483190-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Use uint16_t for unsigned 16-bit data and uint32_t for unsigned 32-bit. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- include/hw/virtio/virtio-access.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/virtio/virtio-access.h b/include/hw/virtio/virtio-a= ccess.h index 6818a23a2d3..ae8c9feffc5 100644 --- a/include/hw/virtio/virtio-access.h +++ b/include/hw/virtio/virtio-access.h @@ -120,7 +120,7 @@ static inline void virtio_stq_p(VirtIODevice *vdev, voi= d *ptr, uint64_t v) } } =20 -static inline int virtio_lduw_p(VirtIODevice *vdev, const void *ptr) +static inline uint16_t virtio_lduw_p(VirtIODevice *vdev, const void *ptr) { if (virtio_access_is_big_endian(vdev)) { return lduw_be_p(ptr); @@ -129,7 +129,7 @@ static inline int virtio_lduw_p(VirtIODevice *vdev, con= st void *ptr) } } =20 -static inline int virtio_ldl_p(VirtIODevice *vdev, const void *ptr) +static inline uint32_t virtio_ldl_p(VirtIODevice *vdev, const void *ptr) { if (virtio_access_is_big_endian(vdev)) { return ldl_be_p(ptr); --=20 2.26.3