From nobody Mon Feb 9 10:49:29 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1685609364; cv=none; d=zohomail.com; s=zohoarc; b=TNQTi5jSWA5Dd/wRuqUwHx9oQZmFdJD5LtPCjtTQtPkaGpsGDqpkBkddJfczubSmww/MaItajepLwdJrbbKzQSgMJHVraiFxAPK7xZ0goYHDEZbKgYV2Wcx06NyQvAbpJJRaeUK+85YDfTEpJ0QGrXKojWPirfiLd2/tRYjFfEQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1685609364; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xeSLdi9yuZuMrDKTknXLipIRbAeJX5rbyOelk6PqFnI=; b=VCK5qMSIxae7oAr4K7/U/qiLvMTo1Tr/X/zqgLKtAEGdMMXga01e85WvDtnw9Z3DuedZU7jPU6u5Xza0mzzmb4xppV5f5Fosp/ZYlZX4olX7SCCbGvxcBVEtKkeN2Mb+wDtQyZg5qqGOgZn36IAohLF4vjnLuIpPltxhyM4jEl4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 16856093648162.9685623137262382; Thu, 1 Jun 2023 01:49:24 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q4dzK-00027I-J9; Thu, 01 Jun 2023 04:48:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q4dzE-00024T-L3 for qemu-devel@nongnu.org; Thu, 01 Jun 2023 04:48:52 -0400 Received: from mail-oi1-x229.google.com ([2607:f8b0:4864:20::229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q4dzC-0006HM-W4 for qemu-devel@nongnu.org; Thu, 01 Jun 2023 04:48:48 -0400 Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-39a55e5cfc0so463483b6e.3 for ; Thu, 01 Jun 2023 01:48:46 -0700 (PDT) Received: from localhost ([117.136.38.170]) by smtp.gmail.com with ESMTPSA id 23-20020aa79157000000b0063799398eaesm4613494pfi.51.2023.06.01.01.48.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 01:48:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685609325; x=1688201325; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xeSLdi9yuZuMrDKTknXLipIRbAeJX5rbyOelk6PqFnI=; b=XWOrALI3R6C1a2Y9H8JTtP5naJ0BpcPp/LnylSFYjKtHaAgCTP9ud0WKU6CY1SLWaW 9ueTc3MocRdNp7X0AdFd6+Sg7/N/NIi78QR1pO6+/NgAi6pMKhVVoLZ9NfQmZpw/WO+p 4kFUefiUQoLlXGIUsoyTo4Ji92VZQCDoEpYW7K2x0M7MGwDkKJfLDihvR7JHNNqwCW2j rQ5vLSVRy/zrAQylZPIXWVWVKXQiA7zToMq0ys4ZlIdyC0Of0EHiolKTOztogOYgkFX2 chegX/c5cUffpQmUMgkZwmNqcqqesg+h96lfqprzzKzoTekhduzChd8O/k1/29BuBfkO r6nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685609325; x=1688201325; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xeSLdi9yuZuMrDKTknXLipIRbAeJX5rbyOelk6PqFnI=; b=dQ9GXEN8R52/RLu4+bzUceVzK43y6JXGmNgwi9PCGsQ7DL+vNKPK7+5bW3u8PTUXSD 1v1ne2+9Cd3d3eAZZyHEItEHfPjnN5aA11qhXkZKcV7ieDU6l2RUG2TTCzZdsU4D3ooI 7UNhbzVC7nUYrvjluk4Pn0aqy/LZGpHygW8tHXmvGxNR09zNnJ9FEPMXiEepC7y6S+YY P5ALpsgzsUFcJBsV+XMGr/MZ4H5IkcN1DDZibyM4RmGOo79UWhNfe32ySIu1UCnWc5ae yTPT5dlabglDMhxxL7LFtS4yzNNKLUf9B4cJYgql9AcracT8yucSsxT1vx9G33PRZNe6 tqww== X-Gm-Message-State: AC+VfDwfGP02HfrsENLpiRe21kuQeWS6V+BAMn5CFA3U+49tqU93CG9R 8W4Ij/LDjZgS/MmsBTndBhU= X-Google-Smtp-Source: ACHHUZ6lya269BlkEHUmJI42qAKkOVzuHlaYjYo0dSWaQEusKeG6r5EReG3xhZzRzRGi3+Upgj2bOA== X-Received: by 2002:a05:6808:1792:b0:38d:ed6f:536 with SMTP id bg18-20020a056808179200b0038ded6f0536mr8230521oib.42.1685609325374; Thu, 01 Jun 2023 01:48:45 -0700 (PDT) From: Hawkins Jiawei To: jasowang@redhat.com, mst@redhat.com, eperezma@redhat.com Cc: qemu-devel@nongnu.org, yin31149@gmail.com Subject: [PATCH v2 3/6] hw/net/virtio-net: make some VirtIONet const Date: Thu, 1 Jun 2023 16:48:17 +0800 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2607:f8b0:4864:20::229; envelope-from=yin31149@gmail.com; helo=mail-oi1-x229.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1685609366805100008 Content-Type: text/plain; charset="utf-8" The VirtIONet structure is not modified in virtio_net_supported_guest_offloads(). Therefore, make it const to allow this function to accept const variables. Signed-off-by: Hawkins Jiawei --- 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 6df6b7329d..7b27dad6c4 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -874,7 +874,7 @@ static uint64_t virtio_net_guest_offloads_by_features(u= int32_t features) return guest_offloads_mask & features; } =20 -static inline uint64_t virtio_net_supported_guest_offloads(VirtIONet *n) +static inline uint64_t virtio_net_supported_guest_offloads(const VirtIONet= *n) { VirtIODevice *vdev =3D VIRTIO_DEVICE(n); return virtio_net_guest_offloads_by_features(vdev->guest_features); --=20 2.25.1