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 B191346061; Sun, 12 Jan 2025 21:20:56 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D866B4066F; Sun, 12 Jan 2025 21:20:42 +0100 (CET) Received: from mail-lj1-f225.google.com (mail-lj1-f225.google.com [209.85.208.225]) by mails.dpdk.org (Postfix) with ESMTP id B4E0340665 for ; Sun, 12 Jan 2025 21:20:40 +0100 (CET) Received: by mail-lj1-f225.google.com with SMTP id 38308e7fff4ca-30613037309so10610031fa.3 for ; Sun, 12 Jan 2025 12:20:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736713240; x=1737318040; 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=ftZprN/J+nUH2YqNPxxurwTuGIXnKDqAzaWjrIlYcPM1aG4l6nyhzw0XPMEP4i1f3/ xeRs0tTF98PR4YznKlt1HtCR5Wn9ETB25ydnmuRqGfXpeDXqyAqgMtpPRHc/YNFXKkDG B8XaO0fn6Ta78/5k2eFW4THAHu+U+4sPHDlFXZQf0EYCyxg05WThTraPsVaYJMPZnSc0 pnskyQEXRUFahOjnfMVy3SGDYDYEEJvYl0pkWkPD+Z+BJdZKzTwl0OCYunaRH6hkTxDo hk18zrjdfPjYqQ3S1/NIHPUPUyhcFYGON2rTsHO+Eum4o9SVFQO5WojHaE0Apv60fC/w g++Q== X-Gm-Message-State: AOJu0Yz58kSdmcwnOQ597HXUPCtibmnCNUQ2emPbVcQKKyS+Eu/fTZ1D KvvlnJto5HNBXqU2cUGetfzSO3lae8cwfN5SR7yLXiyB5UnOrxN+aWPh+YJZpzXSTwahZ+nexDf eLDs9Uq6OzqLIOeNg2UoAP0wd42fQOAVXeTTgDY1G X-Gm-Gg: ASbGncu7d03kzWRlAe83mKMC8wysbwc4FhEqyJmsFOx41iQQ8qU+v4RDouA73Pz6pM7 e7gja6/yiMn+GCGAnpz5tKvdXTc8b0OvhKhieoHb7X0rna5Rg5h4k/jPVvWqw3wevAP7LMdwL0f 8aH0TAqK1b2JYh+/iUehIQJ2wE+xpkAphnmO5P+jMnHdT48Q386hh9ZrtXh4zDVAvQG3+uZVwP6 hGewrs/EA8bGf1Iz5nCMSrpk/Q3ABOe29kz38de5UbYYRUDJggMgqE0VCWvl3c5cfpkxNnRghMj Hi/9Kxp7Zho08hpvy8QPlkuN5w== X-Google-Smtp-Source: AGHT+IFTM/NHRhdIQFo6ZF0DlczVyQZOL4jLy88zBz3WAiqBhs2DAN0zQViBhnrj+ii2ZLVzHlQD67Ai91aX X-Received: by 2002:a2e:a9a8:0:b0:304:4cec:29f9 with SMTP id 38308e7fff4ca-305f459ab2bmr53187161fa.3.1736713240188; Sun, 12 Jan 2025 12:20:40 -0800 (PST) Received: from smtpservice.6wind.com ([185.13.181.2]) by smtp-relay.gmail.com with ESMTP id 38308e7fff4ca-305ff137919sm1953641fa.34.2025.01.12.12.20.40; Sun, 12 Jan 2025 12:20:40 -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 CF3E013DDE; Sun, 12 Jan 2025 21:20:39 +0100 (CET) From: Ariel Otilibili To: dev@dpdk.org Cc: Stephen Hemminger , Thomas Monjalon , David Marchand , Ariel Otilibili Subject: [PATCH v3 4/6] net/failsafe: remove check around pthread_mutex_init() Date: Sun, 12 Jan 2025 21:20:19 +0100 Message-Id: <20250112202021.179634-5-otilibil@eurecom.fr> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20250112202021.179634-1-otilibil@eurecom.fr> References: <20250112185842.9752-1-otilibil@eurecom.fr> <20250112202021.179634-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