From patchwork Thu May 20 13:35:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaetan Rivet X-Patchwork-Id: 1481624 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=openvswitch.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=u256.net header.i=@u256.net header.a=rsa-sha256 header.s=fm1 header.b=fr6i86Xg; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm2 header.b=c+unNrLp; dkim-atps=neutral Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Fm9kC0rbdz9sTD for ; Thu, 20 May 2021 23:36:19 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id F002D83CF9; Thu, 20 May 2021 13:36:14 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qlf18uecDFCo; Thu, 20 May 2021 13:36:13 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTP id 238DB83BBC; Thu, 20 May 2021 13:36:11 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id AF12FC0022; Thu, 20 May 2021 13:36:08 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 66830C0001 for ; Thu, 20 May 2021 13:36:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 48E90607BE for ; Thu, 20 May 2021 13:36:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=u256.net header.b="fr6i86Xg"; dkim=pass (2048-bit key) header.d=messagingengine.com header.b="c+unNrLp" Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nZx7tGAgxETP for ; Thu, 20 May 2021 13:36:03 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by smtp3.osuosl.org (Postfix) with ESMTPS id B28BB605D9 for ; Thu, 20 May 2021 13:36:03 +0000 (UTC) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id B27D15C01B7 for ; Thu, 20 May 2021 09:36:01 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 20 May 2021 09:36:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=u256.net; h=from :to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; s=fm1; bh=fPf3qvElfOarNlye+EYY+qXW9k FSK71qaIqX3c+pQIk=; b=fr6i86Xgp/MXO3jn5LEPUSu1z8LMj5wdkfUvL5hd+R gylUwYa7B07Hs8tm/D66bDkwsQNYWrp79DlhOIrn0DVdIkzKx59ARhMmH6xTawTD 7CoTHQVKZswnzlD78+rq6OnvcFPXrWfnfC/nEl0r6Qk59c39G5wYYC5ACEtplFkq mDd7CYuwsNc2ubglBwvyus2eT1qkm1tyfUmjDIiBcxo/9JezvlirEYvOdpenfbqM RWvYn7jhrwos0ENHpfEUUjy1kFRf5T4rT9erE6kh4eEZVc+zPpGQKbGr5u8xqucj gtmRbMXSZ8kdaTZcSoTR9pxyxaI75LUnHjA7VAYUaekQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=fPf3qvElfOarNlye+EYY+qXW9kFSK71qaIqX3c+pQIk=; b=c+unNrLp EMet3EZInKZjJrwDlCdjjrlHiG8ZZlO1RM0AIcVkY4njlsGnO4vp2Cdl/aeNrbNI g0RQpK0mfT4OpLHDQA/aRn0L2zcyzDwAceeT69OdWMT24S4G/exK0AqZ1LvTdnXk d9QqrsTHWWRVW/LE0bKcXDgx/vpBM5qOOp2LgvHVyBy7O511ItI7WqIizSYDcSos qi6Da7dCIa56QJY++4bT6TASMTJh5rRFkBmc/SgCPJCSRJYsTCwFknt05wO4AaGe nbcEuT+8SRP1azHhFO7KUKgZcNAtsmyNn7a1HiSP+4wAbz1gBzXpwuZM52VB7gYg DFDPpJAkZsnHgw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdejuddgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepifgrvghtrghnucftihhvvghtuceoghhrihhvvgesuhdvheei rdhnvghtqeenucggtffrrghtthgvrhhnpeehgfevffekteehteefieefvdehleefjeefhe evudetjefhkeeutdekieeuvdetheenucfkphepkeeirddvheegrddvgeefrddugeeinecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghhrihhvvg esuhdvheeirdhnvght X-ME-Proxy: Received: from inocybe.home (lfbn-poi-1-930-146.w86-254.abo.wanadoo.fr [86.254.243.146]) by mail.messagingengine.com (Postfix) with ESMTPA for ; Thu, 20 May 2021 09:36:01 -0400 (EDT) From: Gaetan Rivet To: ovs-dev@openvswitch.org Date: Thu, 20 May 2021 15:35:51 +0200 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [ovs-dev] [PATCH v2 7/8] ovs-rcu: Remove unused perthread mutex X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" A mutex is allocated, initialized and destroyed, without being used in the perthread structure. Signed-off-by: Gaetan Rivet Acked-by: Ben Pfaff --- lib/ovs-rcu.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/ovs-rcu.c b/lib/ovs-rcu.c index cde1e925b..1866bd308 100644 --- a/lib/ovs-rcu.c +++ b/lib/ovs-rcu.c @@ -47,7 +47,6 @@ struct ovsrcu_cbset { struct ovsrcu_perthread { struct ovs_list list_node; /* In global list. */ - struct ovs_mutex mutex; uint64_t seqno; struct ovsrcu_cbset *cbset; char name[16]; /* This thread's name. */ @@ -84,7 +83,6 @@ ovsrcu_perthread_get(void) const char *name = get_subprogram_name(); perthread = xmalloc(sizeof *perthread); - ovs_mutex_init(&perthread->mutex); perthread->seqno = seq_read(global_seqno); perthread->cbset = NULL; ovs_strlcpy(perthread->name, name[0] ? name : "main", @@ -406,7 +404,6 @@ ovsrcu_unregister__(struct ovsrcu_perthread *perthread) ovs_list_remove(&perthread->list_node); ovs_mutex_unlock(&ovsrcu_threads_mutex); - ovs_mutex_destroy(&perthread->mutex); free(perthread); seq_change(global_seqno);