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 6154B46080; Tue, 14 Jan 2025 08:51:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9DF1340647; Tue, 14 Jan 2025 08:50:58 +0100 (CET) Received: from mail-ej1-f98.google.com (mail-ej1-f98.google.com [209.85.218.98]) by mails.dpdk.org (Postfix) with ESMTP id B5428402EF for ; Tue, 14 Jan 2025 08:50:56 +0100 (CET) Received: by mail-ej1-f98.google.com with SMTP id a640c23a62f3a-aa6a92f863cso972983866b.1 for ; Mon, 13 Jan 2025 23:50:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736841056; x=1737445856; 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=T0wJx4SWyL+QZwk5JCM/EVD1DPax3rzq90Rme/s3DhI=; b=FHqZjc6qAh3U7ApX+EOvjNTLvbLV1TbaCvd96wxiFRhGQYUSuX4xthnyjMl/q9JEpW 9T8YggciV872oA0XgxzLhWA1MiUZuynzZoADmrVg3HgUKmeeO1hVTxOzXMrCjpH+IhCR wEnpAhw/lNDBHkl/H36kTO2pjr5h5dZZ5TYUZY28CMGzWbFT1BSDO4jdP3WD0MbNE+8G jtgbtzo6q6BbISOrRLpnGfxEpGom423WaKnSLIAb3aeoT5Sx6yL6u3j87+2UKbDwUhBS ad5gcdpN6ixLkqqtqYwXrpx+K5Rog8yRBt8QilxQbyqMEb8izPVGlOWdOLHWViiTJS+V 1RCw== X-Gm-Message-State: AOJu0Yym/N2oscHVUC4SSdxQO4XRACWpwMokNmeEz9dTSj6KzDNwC9rZ M9YrauBgeRue5TOKTgygYXcAk03O5YaTjBe5c6FNBeZ0iCLioGt40MEuJHImrNsaZKt1KWaKsey vG0AGcBAZWjlrO5m0/M6UBnNm9h+TDnieIVmWdOS1 X-Gm-Gg: ASbGnctv/VDkGQo+hZukNdLJy5eebutH62XIV8eDM3a5tsftHF+ARsbAjIFeGodUMbh M3bqMwC9qnkaPLz3XCr1gXVcZircvBlaiRdcldhod520nPPxHtSjPeSMkHWQDKeVga7y+ZjwMW1 Non7NQk6mzFC5xCCns0ASp9RkDR6w60SBCdNNFiWpttovI71pM3DlCT81o88usUSFC0atQTWDxx 9UBiPO+BsBEhpVIpgfEKh5+4TZ64fF4UDOhWAfiCnbCoEfEDq2jMGkN3iYdoooHN7lANEnzSS07 9C6NBLp82TBuCnxRkMDo+O9fDQ== X-Google-Smtp-Source: AGHT+IFXyzsG+XLKkJRjjV4cqIW8CYcvF8xcylh12OCZ4vyzl9DiuvANTCnfXBCFNCu5JG2aDmOwkvQF8qHI X-Received: by 2002:a17:907:2d8f:b0:aa6:a87e:f2df with SMTP id a640c23a62f3a-ab2ab73b672mr2177641966b.25.1736841056116; Mon, 13 Jan 2025 23:50:56 -0800 (PST) Received: from smtpservice.6wind.com ([185.13.181.2]) by smtp-relay.gmail.com with ESMTP id a640c23a62f3a-ab2c90dc1f1sm48981366b.94.2025.01.13.23.50.56; Mon, 13 Jan 2025 23:50:56 -0800 (PST) X-Relaying-Domain: 6wind.com Received: from localhost (rainbow.dev.6wind.com [10.17.1.165]) by smtpservice.6wind.com (Postfix) with ESMTP id F08581027D; Tue, 14 Jan 2025 08:50:55 +0100 (CET) From: Ariel Otilibili To: dev@dpdk.org Cc: Stephen Hemminger , Thomas Monjalon , David Marchand , Ariel Otilibili , Gaetan Rivet Subject: [PATCH v4 4/6] net/failsafe: remove check around pthread_mutex_init() Date: Tue, 14 Jan 2025 08:50:31 +0100 Message-Id: <20250114075033.2027286-5-otilibil@eurecom.fr> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20250114075033.2027286-1-otilibil@eurecom.fr> References: <20250112185842.9752-1-otilibil@eurecom.fr> <20250114075033.2027286-1-otilibil@eurecom.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 > pthread_mutex_init always returns 0. The other mutex functions > return 0 on success and a non-zero error code on error. Link: https://man7.org/linux/man-pages/man3/pthread_mutex_lock.3.html Bugzilla ID: 1586 Cc: Gaetan Rivet Signed-off-by: Ariel Otilibili Acked-by: Stephen Hemminger --- drivers/net/failsafe/failsafe.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c index 32811403b4c8..3e590d38f71a 100644 --- a/drivers/net/failsafe/failsafe.c +++ b/drivers/net/failsafe/failsafe.c @@ -147,12 +147,8 @@ fs_mutex_init(struct fs_priv *priv) ERROR("Cannot set mutex type - %s", strerror(ret)); return ret; } - ret = pthread_mutex_init(&priv->hotplug_mutex, &attr); - if (ret) { - ERROR("Cannot initiate mutex - %s", strerror(ret)); - return ret; - } - return 0; + + return pthread_mutex_init(&priv->hotplug_mutex, &attr); } static int -- 2.30.2