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 9E6C746060; Sun, 12 Jan 2025 19:59:22 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 097604060B; Sun, 12 Jan 2025 19:59:06 +0100 (CET) Received: from mail-ed1-f98.google.com (mail-ed1-f98.google.com [209.85.208.98]) by mails.dpdk.org (Postfix) with ESMTP id 9E197402F1 for ; Sun, 12 Jan 2025 19:59:04 +0100 (CET) Received: by mail-ed1-f98.google.com with SMTP id 4fb4d7f45d1cf-5d414b8af7bso6481909a12.0 for ; Sun, 12 Jan 2025 10:59:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736708344; x=1737313144; 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=GGaKIy3nZ8D4BLCZpsxFp77loDI3J+1bu9OCK5g78AhxlMktebtEfeFpU5T0GCkl7j ijq4bMBey8GamEvQdTUDzjITP6/odTIHuD1Rl33imfO9tMpp79GePnE0SkLlunFzfXH5 7AoAsJNeM9+MGgzlyoubARzSiT77h6iNWrocY/ZD4MGrxcqUQrA5oRIPyrX9rxoA9J7l axiflhwSdI2Ay7DqdE2CqazCxCN+wTm3gi1BMvPsFkZidoD0lUxy0EuvRnmelBYAPNLM T+b2SekWpj40Co21XBKgkF+gKVng4wpoU77Mlx1v17hlIbHFyVQpIV5STfviFcSb0O7E 3XEg== X-Gm-Message-State: AOJu0Yx7jrnJwZrCC6Gx98EC3oPr2e13YQNzRQbgZ0o1LyYG7jjc4P8w 4ahGx8i2FDt55h4y5T5jcdhG/6awP536xVih7tbys7VDn3CoI+y2slYpdPD14PVusiDeQtPzzAx hqSDzQ4z3BVf17RFZdTMo+QtNkmt4kVuxlLTWOj+y X-Gm-Gg: ASbGncuplIIE8HXqG4nfONhG5wHDKLR5tN7Z1gB4rCdt2m/sOpGIOoLTYrilMbmtdeR DMZNU1awrHxaR4+TKEeaCorc0MsqlrW1T2mBoluQvPj/kLrh/uRgsOpopfGQUf6s6aTFkuL0rMZ bGW/OmIkDjhnlz4rWo/P042JL/cxNlihqrFr4snzOjrZKo8un06Nyh3WWPfSICJ9hMcJ/mFM2yh hamtcm3l7dGCVrKfW1IQXL7Omhl0z9Ed1taUTsPxw8NdLPvY/vKhxpWDnQFF3hk/c3ScOZghwYQ MMujEfJCET85wiuW+Jc83bJIWA== X-Google-Smtp-Source: AGHT+IGbFqxlYnDzUHIUu8cwIOwTYhs8ru4rYMnsY1nGcJUhK2ULL6irSPYxYQZiDimg06NkZ5d88ScSKYDh X-Received: by 2002:a05:6402:13c1:b0:5d0:e563:4475 with SMTP id 4fb4d7f45d1cf-5d972e70305mr15684708a12.29.1736708344150; Sun, 12 Jan 2025 10:59:04 -0800 (PST) Received: from smtpservice.6wind.com ([185.13.181.2]) by smtp-relay.gmail.com with ESMTP id 4fb4d7f45d1cf-5d99ef14673sm290092a12.4.2025.01.12.10.59.04; Sun, 12 Jan 2025 10:59:04 -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 04D0313D79; Sun, 12 Jan 2025 19:59:04 +0100 (CET) From: Ariel Otilibili To: dev@dpdk.org Cc: Stephen Hemminger , Thomas Monjalon , David Marchand , Ariel Otilibili Subject: [PATCH 4/6] net/failsafe: remove check around pthread_mutex_init() Date: Sun, 12 Jan 2025 19:58:40 +0100 Message-Id: <20250112185842.9752-5-otilibil@eurecom.fr> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20250112185842.9752-1-otilibil@eurecom.fr> References: <20250112185842.9752-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