From patchwork Tue May 11 10:41:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1477068 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=XF+A49W8; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FfZZR3t90z9t18 for ; Tue, 11 May 2021 20:55:11 +1000 (AEST) Received: from localhost ([::1]:36656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgQ2f-0003ci-IU for incoming@patchwork.ozlabs.org; Tue, 11 May 2021 06:55:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgPq5-0005tc-NZ for qemu-devel@nongnu.org; Tue, 11 May 2021 06:42:09 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:35817) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgPq3-0002CL-79 for qemu-devel@nongnu.org; Tue, 11 May 2021 06:42:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620729726; 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=XF+A49W8RBSCYu3Z/Pm4uMDZilduh7pIcTSKFUrlfFn8pGusDckXnOSp7/aky5tgfcfvNy NWjme0UQEceZTQYdBecd+5/TrtIREid/RBbq+Da3K6xW8JT8w/1atTxA7Ijqg9Wg72Y1RL z0o7RE6bq/YQohW2/DoUT+rXxhuGoGI= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-62-KC2_Wz6PPf29fCt-mGERJg-1; Tue, 11 May 2021 06:42:05 -0400 X-MC-Unique: KC2_Wz6PPf29fCt-mGERJg-1 Received: by mail-wm1-f69.google.com with SMTP id o10-20020a05600c4fcab029014ae7fdec90so571784wmq.5 for ; Tue, 11 May 2021 03:42:05 -0700 (PDT) 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=i9qJLVz0Qx7fqAbNeM5pI28b+V46JFftviEAIP4652LL3VgMKKYhGyRsef0ZPB5mdR at13zD4ler2kX/fAmXO1EPF++gtirGbSLq2p+liOWmM5CS7X2yqTu1EIdFUXFGH0tV/R rs5Ly3HzjQrGV4Fh6lXgeC/RMbk1YGtoaThHXkB+noxXqGWz1zsLVNrvADINj65i0lAO vh/VefhzGPU3uqo2uSmU3PoCjQ+6UEfcykcXkVUKEzn9d3A7T2i7cFfVzoDcoOQEc0vB GAllvjEY9gY8uQEtmuvL2Rakc4dzbA8S1swUUJLF5DpCfKHGPgFBpb9/4GO5nx+EiUPI 9Prg== X-Gm-Message-State: AOAM532dPdQrORBEb5Xk1C3y2C9zEob/F7NyhZ41NvU+M86Qu+shfwMO FbdwIm2f8QVzcPzA/7LAUSId5jpLtuQUOkoyy89xFSAuBwhOvos7r7ZrCqvKe//Zp97zFvCiBmk yaWD+18DTJQKmTSs1QPkt8kDD3tMzBRaA6JmjWyChCQpTYTP4lE4obMXFBCRNtU6K X-Received: by 2002:a05:6000:1449:: with SMTP id v9mr37025548wrx.82.1620729724022; Tue, 11 May 2021 03:42:04 -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) 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) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org 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 Received-SPF: pass client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.698, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-block@nongnu.org, "Michael S. Tsirkin" , qemu-trivial@nongnu.org, Jason Wang , Max Reitz , Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The VirtIOFeature structure isn't modified, mark it const. Signed-off-by: Philippe Mathieu-Daudé 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; -size_t virtio_feature_get_config_size(VirtIOFeature *features, +size_t virtio_feature_get_config_size(const VirtIOFeature *features, uint64_t host_features); 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; } -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 = 0; From patchwork Tue May 11 10:41:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1477078 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=On6vwHEw; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FfZgq2ZfPz9sV5 for ; Tue, 11 May 2021 20:59:51 +1000 (AEST) Received: from localhost ([::1]:47420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgQ7B-0003XY-AV for incoming@patchwork.ozlabs.org; Tue, 11 May 2021 06:59:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43640) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgPqA-0006B6-G7 for qemu-devel@nongnu.org; Tue, 11 May 2021 06:42:14 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:58053) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgPq8-0002Fw-Ug for qemu-devel@nongnu.org; Tue, 11 May 2021 06:42:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620729732; 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=X1iTG1yjolMhBDy0+VNZDVcooHD0ZAJOzdWx2SUtTQk=; b=On6vwHEwNlKr1gHzj24sEI5QyEA/fCY3hpd3wdyHi/HmtssCjNi68E2ozeTfvtKHvbxWHh /AjlMSccCpyrEYE9tlxfbV1XnsnTNWDos0zhgKj+pC8Qv3XSKWIWu2yB/gwbNF0UOh6ZPa 11pblbo10FrBKMbWxUCGRtaiNfhfl4g= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-586-kZBhTU0CMKqSRC6_EQN_GA-1; Tue, 11 May 2021 06:42:10 -0400 X-MC-Unique: kZBhTU0CMKqSRC6_EQN_GA-1 Received: by mail-wm1-f72.google.com with SMTP id b128-20020a1c1b860000b029015b52bdb65aso879607wmb.5 for ; Tue, 11 May 2021 03:42:09 -0700 (PDT) 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=X1iTG1yjolMhBDy0+VNZDVcooHD0ZAJOzdWx2SUtTQk=; b=KhBLOmFv1ZiCKDmNl5SEQhxfbN7CDAetXN3BNvoDmlr+MCEfoqP701fE4mCv5Y/sHY u2pJRq98rDdmClrZq99zpmX+3Zsh0tLWIiTbRg4rX2qAryzmDHrSx2VX/UV93EhNlflc CO1PIqBdhCinvtw+/RsPjmpLzKSwUeqZJn7X3YwWbWjfMST7vf05zSYqjxhzN1J+u+WN /CO4I5m9wJzBqKFFbYr5V/boAvVR7kPL4qqwjcJQeKiCiqDsZbKo1RlgQjTFQUQA5Gxv M/G3xtWcBKD1lGmwnjGOsM1nPIUP29b29DibbQx+ajbAABbSjeHP/e/UX7/4DtYzLWQG WQEg== X-Gm-Message-State: AOAM530u0ZDiITcGcUe9kjxKjUSC0jbfs7/cZ4vstJa9DyGCR6Tbekgs VPCKkgD3D6r+e7nAEfX6UsUgF6zJYVeU3KiS9XtN677swOvqVZ1UBmnJk4T/oLuTGNgFtvnZQ0a 9sy2GuQC/fPPz0lf0YyHo8QyLJdWzwUoMu7+P9Pma34vef2W/l/SyqZQTEPPxa8Wa X-Received: by 2002:adf:e510:: with SMTP id j16mr37794837wrm.28.1620729728419; Tue, 11 May 2021 03:42:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzv5XBBZ0qMOazznFfZigWz5hluW3ryczVSzJckCIkkWIplwaxlHe9vrbqbQHM2e8YxGory/A== X-Received: by 2002:adf:e510:: with SMTP id j16mr37794809wrm.28.1620729728226; Tue, 11 May 2021 03:42:08 -0700 (PDT) Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id r18sm1394695wmp.0.2021.05.11.03.42.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 May 2021 03:42:07 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 2/3] virtio-blk: Constify VirtIOFeature feature_sizes[] Date: Tue, 11 May 2021 12:41:56 +0200 Message-Id: <20210511104157.2880306-3-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 Received-SPF: pass client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.698, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-block@nongnu.org, "Michael S. Tsirkin" , qemu-trivial@nongnu.org, Jason Wang , Max Reitz , Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé Acked-by: Jason Wang --- hw/block/virtio-blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index d28979efb8d..f139cd7cc9c 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -40,7 +40,7 @@ * Starting from the discard feature, we can use this array to properly * set the config size depending on the features enabled. */ -static VirtIOFeature feature_sizes[] = { +static const VirtIOFeature feature_sizes[] = { {.flags = 1ULL << VIRTIO_BLK_F_DISCARD, .end = endof(struct virtio_blk_config, discard_sector_alignment)}, {.flags = 1ULL << VIRTIO_BLK_F_WRITE_ZEROES, From patchwork Tue May 11 10:41:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1477077 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=fPO8ehbY; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FfZfK6907z9sV5 for ; Tue, 11 May 2021 20:58:33 +1000 (AEST) Received: from localhost ([::1]:45056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgQ5v-0001vq-RO for incoming@patchwork.ozlabs.org; Tue, 11 May 2021 06:58:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43694) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgPqJ-0006KN-Oq for qemu-devel@nongnu.org; Tue, 11 May 2021 06:42:24 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:45768) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgPqF-0002KS-0x for qemu-devel@nongnu.org; Tue, 11 May 2021 06:42:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620729737; 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=BVG2n9XotM2KhddIex7o7vuIKhUEP78KP392Bahm1XY=; b=fPO8ehbYI3s7evotaTUEcLj9wqA/kH/gS84nEka7f6dgKPVyDg/RS56UYklR5FyORFS6cl SAX0fOeqqzIPi9W90lByTgxbrffnrQBga8ik83E6uGlpvVXnta8pg10GWbEJmNEiuvYNbQ c2Ct3ZrxqOgdlCS56U2urazoWrsG6xo= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-388-nKcxaUAaNRSDtRoQ2S-MkA-1; Tue, 11 May 2021 06:42:14 -0400 X-MC-Unique: nKcxaUAaNRSDtRoQ2S-MkA-1 Received: by mail-wr1-f71.google.com with SMTP id a7-20020adfc4470000b029010d875c66edso8564084wrg.23 for ; Tue, 11 May 2021 03:42:13 -0700 (PDT) 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=BVG2n9XotM2KhddIex7o7vuIKhUEP78KP392Bahm1XY=; b=hYf55i2mZjZict/yqRKA4I6IyutvtRDR0HKafdXPDCy6I7XFqwcNRhC2ISK9VPB6kO 8XayS1Y8PcUwprOT44Ecz8RHePeq3/22tKd01cNiBAuaU9ZAnPqySmxScxkhKZrUJbgT 4L95w1kq1/lT+pg5b2urP2N0Pagl1DGW7c+hV1a4ugSvf6Zt1YDknWeH4demdNndVPoh hcfsRKcfiB61IMV7SLRg7G34RAtXPQvKWOVJsdVWRzoc0lo+pq5Pg8IpUI5XV2SMwiq1 XjYsEeIz2PnkWKNZVQxmXBLXag2JeomNH875brCTnwkGTeiJEieIZIG2CzgdVZ3nIor8 Z6sw== X-Gm-Message-State: AOAM53029wR7CI9h3Tvpe1puNQYslzHZc4bzMDTGzys3MnePYnIoh2z4 oKYMhBDc+TxYxbTNPS3e4C3D3/IBl7bpAEVTkzesVnIvD6v5ARYouHhs+dR8Wa3iukgGNO/8GBe j88QYiz9YrnMuKz/Mv9RoPBoh5Cz7lC2hRmGqcccNjUgz5LV7xi+ozrcXENJveKqQ X-Received: by 2002:a5d:4d0b:: with SMTP id z11mr37706222wrt.164.1620729732763; Tue, 11 May 2021 03:42:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyqXkOs+visRNo76+/+kYzrI/MSr5X+AGkyAdK8wmYBSilwONUYlx/BMa7vx3Q39/CT9fGfPg== X-Received: by 2002:a5d:4d0b:: with SMTP id z11mr37706196wrt.164.1620729732569; Tue, 11 May 2021 03:42:12 -0700 (PDT) Received: from localhost.localdomain (39.red-81-40-121.staticip.rima-tde.net. [81.40.121.39]) by smtp.gmail.com with ESMTPSA id v15sm3101362wmj.39.2021.05.11.03.42.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 May 2021 03:42:12 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 3/3] virtio-net: Constify VirtIOFeature feature_sizes[] Date: Tue, 11 May 2021 12:41:57 +0200 Message-Id: <20210511104157.2880306-4-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 Received-SPF: pass client-ip=170.10.133.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -34 X-Spam_score: -3.5 X-Spam_bar: --- X-Spam_report: (-3.5 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.698, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , qemu-block@nongnu.org, "Michael S. Tsirkin" , qemu-trivial@nongnu.org, Jason Wang , Max Reitz , Stefan Hajnoczi , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Philippe Mathieu-Daudé Acked-by: Jason Wang --- hw/net/virtio-net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 66b9ff45118..6b7e8dd04ef 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -89,7 +89,7 @@ VIRTIO_NET_RSS_HASH_TYPE_TCP_EX | \ VIRTIO_NET_RSS_HASH_TYPE_UDP_EX) -static VirtIOFeature feature_sizes[] = { +static const VirtIOFeature feature_sizes[] = { {.flags = 1ULL << VIRTIO_NET_F_MAC, .end = endof(struct virtio_net_config, mac)}, {.flags = 1ULL << VIRTIO_NET_F_STATUS,