From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 15B9D44099; Wed, 22 May 2024 18:33:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 42BDC402CE; Wed, 22 May 2024 18:33:51 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 61CA14025C for ; Wed, 22 May 2024 18:33:48 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 6473520B915B; Wed, 22 May 2024 09:33:47 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 6473520B915B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1716395627; bh=mjLxX5Et5X7f0JyOsTdmJi+qKKRPSLE5aTnECMAvFG0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iyYagIzfgBQnkyZfetq9TAlusiRV/9/vDjCbyN36lz3q6lh52OCop0x2iNTfzjwrm wyYSr6iUdmjjQQToLz0MVCEoq+bkfXtn+mRrYkROVvgCqYM13EugEZOpZqPF6MvzUH wgeNhPRgQFtYxWyOEwdJ846JXU5RprajDYAjG5cQ= From: Tyler Retzlaff To: dev@dpdk.org Cc: Bruce Richardson , Sameh Gobriel , Vladimir Medvedkin , Yipeng Wang , Tyler Retzlaff Subject: [PATCH v2] hash: cast away atomic qualification Date: Wed, 22 May 2024 09:33:45 -0700 Message-Id: <1716395625-7045-2-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1716395625-7045-1-git-send-email-roretzla@linux.microsoft.com> References: <1713283609-32101-1-git-send-email-roretzla@linux.microsoft.com> <1716395625-7045-1-git-send-email-roretzla@linux.microsoft.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org rte_free accepts only non-cva qualified arguments so cast away RTE_ATOMIC qualification for tbl_chng_cnt and h->tbl_chng_cnt when calling rte_free. Without this change using enable_stdatomic=true with LLVM or MSVC will result in a warning being emitted for discarding the atomic qualification. Signed-off-by: Tyler Retzlaff --- lib/hash/rte_cuckoo_hash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/hash/rte_cuckoo_hash.c b/lib/hash/rte_cuckoo_hash.c index 9cf9464..b31a3d9 100644 --- a/lib/hash/rte_cuckoo_hash.c +++ b/lib/hash/rte_cuckoo_hash.c @@ -481,7 +481,7 @@ struct rte_hash * rte_free(buckets); rte_free(buckets_ext); rte_free(k); - rte_free(tbl_chng_cnt); + rte_free((void *)(uintptr_t)tbl_chng_cnt); rte_free(ext_bkt_to_free); return NULL; } @@ -526,7 +526,7 @@ struct rte_hash * rte_free(h->key_store); rte_free(h->buckets); rte_free(h->buckets_ext); - rte_free(h->tbl_chng_cnt); + rte_free((void *)(uintptr_t)h->tbl_chng_cnt); rte_free(h->ext_bkt_to_free); rte_free(h->hash_rcu_cfg); rte_free(h); -- 1.8.3.1