From nobody Mon Feb 9 08:57:41 2026 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=1620729729; cv=none; d=zohomail.com; s=zohoarc; b=Mi7G89xAQXouLON4ji/TmOhFwuPc1w+aMfcyer4fY/2lIGF4XTyLJOKE7N9kLzsAuE27M6Q68U9/n6BZWcgMM+0w1iWPgsz0s/vy1xQO9Z/RP7F4bCRgmnFVb6E9qXkIxa+KpQM0RMs3gCWS1q1HlG1vABS5xUnCbCj7TDh3svU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620729729; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=guuOznVmgMt5Msd5BdcbUpq7g6SfjX+AgvERcmwMxV8=; b=HNl6jEWpjTQ39lda5R4YG5NjbB5LjihVuwgbHp14Fokpv+Aq1PdyYe+/Tm5z3W8VIUxtFtEFgDbJwU5wJnr2VL/4diYPLnWgVph1xqK38/sBWPDUWEABAw7WLnArapm6MaC0itsvuKGtP/+Tw1fGuL3X0sMGDWAJRdRCV2jpbNQ= 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 1620729729888951.5175197449164; Tue, 11 May 2021 03:42:09 -0700 (PDT) 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-277-XDMNJrzjMUS1K2I58WiAuw-1; Tue, 11 May 2021 06:42:05 -0400 Received: by mail-wr1-f72.google.com with SMTP id 88-20020adf95610000b029010758d8d7e2so8504939wrs.19 for ; Tue, 11 May 2021 03:42:04 -0700 (PDT) Return-Path: Return-Path: Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id x11sm665178wrl.13.2021.05.11.03.42.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 May 2021 03:42:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620729728; 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=guuOznVmgMt5Msd5BdcbUpq7g6SfjX+AgvERcmwMxV8=; b=hA7E952TqcOsTsyXwYUPmIjIs5dhREPh1paFk5AW4HGseuyx+jv8ZAdGyFOURy0Oeho+6X 61UbJgILfCqj8tGBA+UfApW8zGZKQOD8ASBiRf6ZZPLt9TYyJuK0ZHOWlV4oB+/2dWysr+ TTztFUm7hrHVc9+VindQByXzHdZCX2Q= X-MC-Unique: XDMNJrzjMUS1K2I58WiAuw-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=guuOznVmgMt5Msd5BdcbUpq7g6SfjX+AgvERcmwMxV8=; b=eWpp426HCdEvpA9KP6Gwdrc3vL3IWyfiMpIAVa+nbGRti/lhSj5XEA6vXSWyBKu+aE +GPDmVojgsuW8ClWqip0tRzWvr7kAOHU9iJQfFtVPbr/wDBBzNuPoWlFYHPydLnBJFjE C8GSA/y0wC2GseEWZuaY/m4d0uP0RuCQ0MQs58XUcJfzh92nHnK3x6+09jOTtxHeuFMr jn/IUvLO9Vbo+Y7w3W2B7Cp6t3pLZkCqzqgI0MbCma8lSt+POgfVB0TNZzrR/qoM2BOv 1M4OPDKYY4dZPSCvJaQnQE42M0yY5KjxqG93cYN/kIFjsTlt6qdFy21bLXDYW0VDx3Wj ToUw== X-Gm-Message-State: AOAM531Db/Ng6C2dSny+YP3kiJTjAbjzJpN0JQqbij8eqyHjiyy5wUs8 alQ3ZOxP8JOeijxHMYdP21rV3riyvX9mrOpucuDHb6vsWF8VHsBiNhtLaVUthoZNzC8ElLZPqPP pNc6IQFwDw/Nhhg== X-Received: by 2002:a05:6000:1449:: with SMTP id v9mr37025532wrx.82.1620729723929; Tue, 11 May 2021 03:42:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwG0+rR3OxuIyKac0sbNFqHgHpRAu66113zstocWkjyedi+qgGAn6TgGowvckH1AI5gNTPRIg== X-Received: by 2002:a05:6000:1449:: with SMTP id v9mr37025516wrx.82.1620729723760; Tue, 11 May 2021 03:42:03 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: "Michael S. Tsirkin" , qemu-block@nongnu.org, Max Reitz , Kevin Wolf , Stefan Hajnoczi , Jason Wang , qemu-trivial@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH 1/3] hw/virtio: Pass virtio_feature_get_config_size() a const argument Date: Tue, 11 May 2021 12:41:55 +0200 Message-Id: <20210511104157.2880306-2-philmd@redhat.com> X-Mailer: git-send-email 2.26.3 In-Reply-To: <20210511104157.2880306-1-philmd@redhat.com> References: <20210511104157.2880306-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) The VirtIOFeature structure isn't modified, mark it const. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Jason Wang --- include/hw/virtio/virtio.h | 2 +- hw/virtio/virtio.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h index b7ece7a6a89..8bab9cfb750 100644 --- a/include/hw/virtio/virtio.h +++ b/include/hw/virtio/virtio.h @@ -43,7 +43,7 @@ typedef struct VirtIOFeature { size_t end; } VirtIOFeature; =20 -size_t virtio_feature_get_config_size(VirtIOFeature *features, +size_t virtio_feature_get_config_size(const VirtIOFeature *features, uint64_t host_features); =20 typedef struct VirtQueue VirtQueue; diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index 9e13cb9e3ad..e02544b2df7 100644 --- a/hw/virtio/virtio.c +++ b/hw/virtio/virtio.c @@ -2981,7 +2981,7 @@ int virtio_set_features(VirtIODevice *vdev, uint64_t = val) return ret; } =20 -size_t virtio_feature_get_config_size(VirtIOFeature *feature_sizes, +size_t virtio_feature_get_config_size(const VirtIOFeature *feature_sizes, uint64_t host_features) { size_t config_size =3D 0; --=20 2.26.3