From patchwork Tue Apr 27 23:03:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gaetan Rivet X-Patchwork-Id: 1470903 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=140.211.166.133; helo=smtp2.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=QUo4CLjT; 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=fB4w69dh; dkim-atps=neutral Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (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 4FVHPy3gVdz9sX2 for ; Wed, 28 Apr 2021 09:04:06 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 0ABAD4052F; Tue, 27 Apr 2021 23:04:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Mj0U_rDwgaXh; Tue, 27 Apr 2021 23:04:02 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp2.osuosl.org (Postfix) with ESMTP id 603D640564; Tue, 27 Apr 2021 23:03:56 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2F3D3C001C; Tue, 27 Apr 2021 23:03:56 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 05398C0001 for ; Tue, 27 Apr 2021 23:03:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id EE8AC40150 for ; Tue, 27 Apr 2021 23:03:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp4.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=u256.net header.b="QUo4CLjT"; dkim=pass (2048-bit key) header.d=messagingengine.com header.b="fB4w69dh" Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uu5jCg6l-3zU for ; Tue, 27 Apr 2021 23:03:48 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by smtp4.osuosl.org (Postfix) with ESMTPS id 28B75400AF for ; Tue, 27 Apr 2021 23:03:48 +0000 (UTC) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 6F2DAF3D for ; Tue, 27 Apr 2021 19:03:47 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 27 Apr 2021 19:03:47 -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=QUo4CLjTbmX+Hx/aR9be7+jokuSwIVyZr8EL9pY74e d54y5xJ44mghgAGIwArxyH9JIvAqlQ3wS/+ft7tq1miIt+amZ9yO/ruD6f8PERKg PG3TqWQvT35yKUWddPTV5y3EXH5g3yfZnE6omGi6IKiA5d+Ce5PkLp63SqPwSinN kFd5gr8f5j/kjwEfCG0mj1/USBFf4VixQ8SaqLPQsB/qFrZJPV8pMXt+hkVmbNSW mxpOA6Mav3qnWbaSWgQaY+UyAXXqBQMPdV4r8p00T6tuwb/2Gpt8vv/ntLqwAMJ5 b88EVvUAbQ7PB192/jBpzEUIG4nG0rzub0rp1vPF6b/g== 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=fB4w69dh GOwA3ahCd8ksF6gDDwhhjqMK3P/JveYKRe8rBxUVHEcdMeUOr9TSE1hOVXePrIQs 5BMOgJeVRNTaMVyJvQckPxmgMDAOOfeqKuwNObmGztMB4Zt2TuSQA7f+Ba52pcEO KZDKeHdQ6NjYJPdlkC5v1eAugU2Hisd1XhLcFonM275TWiOoCSxzp3/R8TxjX7rL 8BC0z+zCsPspIb8jliyhTdi4haxNLuxOrciB5U+nTGEZztB8vKuIxpsbqkBrGWAU t7WzWL2bxhd763vPJd196aK0JCdxtqPWyLDQqjTrIVSL868ey4ML7l/kyAZe7qDX XclDppCVZ9Zdrw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvddvuddgudeiucetufdoteggodetrfdotf 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 ; Tue, 27 Apr 2021 19:03:46 -0400 (EDT) From: Gaetan Rivet To: ovs-dev@openvswitch.org Date: Wed, 28 Apr 2021 01:03:31 +0200 Message-Id: <0f96b9ae302eb8911af1e1a7c6dcc5bab6153b27.1619564350.git.grive@u256.net> X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [ovs-dev] [PATCH v1 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 --- 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);