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 E44154603A; Sun, 12 Jan 2025 20:31:23 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7DBF64065A; Sun, 12 Jan 2025 20:31:06 +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 65FA140611 for ; Sun, 12 Jan 2025 20:31:04 +0100 (CET) Received: by mail-ej1-f98.google.com with SMTP id a640c23a62f3a-aaf6b1a5f2bso883916466b.1 for ; Sun, 12 Jan 2025 11:31:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736710264; x=1737315064; 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=3pf2vfW8BHXtC/ZVi0rugu6Y9yDZbWzEGkI0+fdykHQ=; b=YkzDQGf0T4loujZn9YgMKtyDEKiUzOu6dMFVVDoHbwwzcRIS+nfIVoK92HDIl+7yuU enmmWoztnnqOT3FMNTaremBEFnMATl9PhCjo/46gChm6R4r2XJUjvohwUq8FfonPJcGK 1T+foGw1IAWG8d/r74GdLfu5Dq8spKzI4rv0xaluqMlIKla3aCqA4+mnJuE5xwOyCX3w ynEVfk3JDbx+Em5sTcJxrLcjr0+Qe/6QmbVI1azd+je3zTGOh9U/XOGvwgSdYV6lS/8P t94/NvdoxhUqdxaOSFYGyOdjabpzEMh7yZPWWKwtxXt/BU0c0b8pbGhTHwHDUQEbbkXE qOrg== X-Gm-Message-State: AOJu0YyXJfrmAghCCDSAJZ9k+kppvwHdA0hT04+Z1asD1yilGiAmNy/d k3yBjzrXmtDmyLvKdwXem+n2Gywa2thOP6CoZcyu5v0BX5uNnr4v1pwekIpccKd332xLmgagSNd YZIq6nFyEGbRYd2H6w1bk2yiXBjFmwollxBs6lXti X-Gm-Gg: ASbGncubaeWFi0CdoPsDfJwjfv8ewdUmNGT5wG9BclUiHmaEklOOFGrohYZLJBXI0EM FeMePTJX4BwQo/kLDdOToUJ0gsygx8bBUWf861YLaeXO7h7mBb0SVf/K9tpEmETHVcNCZ2Wicu2 g9L2oYEeQhe3mH7vzDS9z4hyAnCCxHjNHzMpx0WBXyEfmHVKWt/eSsNqCeFFhy06ESDHKc1cpE9 W8wMMzwaT+eImANBL0w4y5SUNlTQkDxdOasljrysnktv3pkUbJFzElLgvB09x9bGZ+EwrUQgyhj Bs+NtHPyw7UKRd+bUi5fIVK58w== X-Google-Smtp-Source: AGHT+IGKXoLzvjka8Fsy9bCli1qtaFgAjrrdffgT58NVAz7BLAIGnKHvH25wF8foRxZu4MZn2YkXnpogBeIA X-Received: by 2002:a17:907:d15:b0:aab:f971:1f73 with SMTP id a640c23a62f3a-ab2c3d4c493mr1169766466b.22.1736710263955; Sun, 12 Jan 2025 11:31:03 -0800 (PST) Received: from smtpservice.6wind.com ([185.13.181.2]) by smtp-relay.gmail.com with ESMTP id a640c23a62f3a-ab2c955cde3sm36431066b.157.2025.01.12.11.31.03; Sun, 12 Jan 2025 11:31:03 -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 C910A13DA4; Sun, 12 Jan 2025 20:31:03 +0100 (CET) From: Ariel Otilibili To: dev@dpdk.org Cc: Stephen Hemminger , Thomas Monjalon , David Marchand , Ariel Otilibili Subject: [PATCH v2 4/6] net/failsafe: remove check around pthread_mutex_init() Date: Sun, 12 Jan 2025 20:30:41 +0100 Message-Id: <20250112193043.67372-5-otilibil@eurecom.fr> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20250112193043.67372-1-otilibil@eurecom.fr> References: <20250112185842.9752-1-otilibil@eurecom.fr> <20250112193043.67372-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 Signed-off-by: Ariel Otilibili --- drivers/net/failsafe/failsafe.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/net/failsafe/failsafe.c b/drivers/net/failsafe/failsafe.c index 32811403b4c8..e1c77cdf4fd1 100644 --- a/drivers/net/failsafe/failsafe.c +++ b/drivers/net/failsafe/failsafe.c @@ -147,11 +147,7 @@ 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; - } + pthread_mutex_init(&priv->hotplug_mutex, &attr); return 0; } -- 2.30.2