From nobody Wed Nov 5 13:14:13 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1536606305076343.92570435586003; Mon, 10 Sep 2018 12:05:05 -0700 (PDT) Received: from localhost ([::1]:53551 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzRUe-0005NW-0n for importer@patchew.org; Mon, 10 Sep 2018 15:05:04 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49151) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fzRPR-0001IA-5j for qemu-devel@nongnu.org; Mon, 10 Sep 2018 14:59:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fzRPP-0001DV-8y for qemu-devel@nongnu.org; Mon, 10 Sep 2018 14:59:41 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:46327) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fzRPO-0001Cu-VB for qemu-devel@nongnu.org; Mon, 10 Sep 2018 14:59:39 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 8A49921F40; Mon, 10 Sep 2018 14:59:08 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 10 Sep 2018 14:59:08 -0400 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 3B7C110298; Mon, 10 Sep 2018 14:59:08 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=mesmtp; bh=tFMvAYeVvbo8fD VzUqKfQ18MPUl9JN/wksfVJXaKRpw=; b=K/BJiBMI7AHxGpdkcrZaW2BiO3Ucet TLaC4e/p/jTg6oR5ANggwEC1I1kMm0B9k9WjgDFYZHhd3daA0uaPCNi1NEnSQOyT x6LB9nao1puNCuvOoCxVCsmdhHcWnC6tXtIAx9hFq2O78vp+NsxnmM+wWR/ukqPP X3ueK3pGwmDqc= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=tFMvAYeVvbo8fDVzUqKfQ18MPUl9JN/wksfVJXaKRpw=; b=jihElqfs gxEcInrz3zhByeWTy2r9p4DF4ejLMQiTIl4CimpeG+aJcZoiG4/3NbY16PSmjXhk kumc0LDTrPuc7qNkfWQJn+BN0Zg9W4jg7J3iVU9oqF8SAh8U9kwaoDfRzJOwgkbt JSuUd6huWvO4nctGqUCfLByCDia1UBnZO1YtdFtOMoT1e7h6qHZSbQbx6whm6/7y CKUSw9gjxnfjiNXryW4ihjMaROym35/eQn0noI/KCPI1HyCZrILjURlActOnf5op JdmybGQzDcSLeeU9AKunABEG8Wjbnd7YxbRat43MvQQTOdRDql5BVld3WKtjZuua bEwFYeuRUqqYww== X-ME-Proxy: X-ME-Sender: From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Mon, 10 Sep 2018 14:58:57 -0400 Message-Id: <20180910185859.27917-11-cota@braap.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180910185859.27917-1-cota@braap.org> References: <20180910185859.27917-1-cota@braap.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.25 Subject: [Qemu-devel] [PATCH v2 10/12] qht: constify qht_statistics_init X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Emilio G. Cota --- include/qemu/qht.h | 2 +- util/qht.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/qemu/qht.h b/include/qemu/qht.h index 2e2d6bca93..758c7ac6c8 100644 --- a/include/qemu/qht.h +++ b/include/qemu/qht.h @@ -211,7 +211,7 @@ void qht_iter_remove(struct qht *ht, qht_iter_bool_func= _t func, void *userp); * When done with @stats, pass the struct to qht_statistics_destroy(). * Failing to do this will leak memory. */ -void qht_statistics_init(struct qht *ht, struct qht_stats *stats); +void qht_statistics_init(const struct qht *ht, struct qht_stats *stats); =20 /** * qht_statistics_destroy - Destroy a &struct qht_stats diff --git a/util/qht.c b/util/qht.c index 020dfe6912..4378775d68 100644 --- a/util/qht.c +++ b/util/qht.c @@ -895,9 +895,9 @@ bool qht_resize(struct qht *ht, size_t n_elems) } =20 /* pass @stats to qht_statistics_destroy() when done */ -void qht_statistics_init(struct qht *ht, struct qht_stats *stats) +void qht_statistics_init(const struct qht *ht, struct qht_stats *stats) { - struct qht_map *map; + const struct qht_map *map; int i; =20 map =3D atomic_rcu_read(&ht->map); @@ -914,8 +914,8 @@ void qht_statistics_init(struct qht *ht, struct qht_sta= ts *stats) stats->head_buckets =3D map->n_buckets; =20 for (i =3D 0; i < map->n_buckets; i++) { - struct qht_bucket *head =3D &map->buckets[i]; - struct qht_bucket *b; + const struct qht_bucket *head =3D &map->buckets[i]; + const struct qht_bucket *b; unsigned int version; size_t buckets; size_t entries; --=20 2.17.1