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 244934603A; Sun, 12 Jan 2025 20:31:29 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 705F04065E; Sun, 12 Jan 2025 20:31:07 +0100 (CET) Received: from mail-lj1-f228.google.com (mail-lj1-f228.google.com [209.85.208.228]) by mails.dpdk.org (Postfix) with ESMTP id EE4F040648 for ; Sun, 12 Jan 2025 20:31:05 +0100 (CET) Received: by mail-lj1-f228.google.com with SMTP id 38308e7fff4ca-30219437e63so43651251fa.1 for ; Sun, 12 Jan 2025 11:31:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736710265; x=1737315065; 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=kgBYsQi9XWVATeXT5gh+Goxoh69Jh/iPX9ERN5IQatg=; b=J/v77V8AVt19Q55tb+TVM+TbYTEqF/tJYTa7nQOxvMoQO8HNjFwq1bqmfBlQofKTUh 1QJFhxAMmJKQHxuGi3pKGn5bV54UXh2Zwq3jxU15HXAnDvJMSkyiTfo/KToEEsUp1M63 oZZ9VpIg0qtJ2lIX1Wu1Pi8OLmEa7olVn96SCgAw94eLLyAUV6EjHrGgk9210z11pu8b Sd+fa0OqORp9rqhl+ni9QJmVi5ZCGMyXCbby/nLaifAEzDbwT/XO4ui6fDJCbbvV+DFP m91ezv2/EiEvZKhJh/cEVnkEtXigusoe9tupDkl+HJcOFHca+kAEmjO9JpgqwFkz/Nqj 5Hfg== X-Gm-Message-State: AOJu0YyWyzbgv6ko9pHkQKSfCQEn/W7LBzFFscq3xk/0QUgr7ZSTx/d4 C4ZAPZntI5LTUhSiDmktezNuGXPUCVy245JVsnzLSNWWoCjdHkWrI9A2bsCdPRSawqOC9Nlflh4 QGH8A9JhPz/iVOKLuRCYHjY0mPsnMMjyrSwM/arFS X-Gm-Gg: ASbGncsqujR8liROIDLOO2bzazoa8AuznaX4N0AsQE4ScnLxGznkDH39XnlH/nIl+A1 cfN707D9PpOzoA/Y+1/EMVnJk6F4qc2kGj6ZcaNHC0SzkP83c6Nv9ZoWHll1Jh5Ejofp3EjJuZ6 lDQnh3d9MZe5uN0SFL6yJzCGnvTjXdv2yE/sY95vQuvQ9Y34yd0GVExZnt4noPOth3diU9nIw4d ZQnMVW3Dhy13BMpkMZQrKAXA0FXtr6zaAryo/MdZj+okXQztMaQtyZ5ebaw2gzfQniTRmq7ML/H 4DLJ371n0I4bc1K0VRcNGysebw== X-Google-Smtp-Source: AGHT+IHRZivK9KkAKT2zY2G5e9YKLT/o1xGcLauD8rxLH6h0YK8Z25CyqHwBqzJnM8OkPvWarSyFET6zkTS5 X-Received: by 2002:a2e:9a10:0:b0:300:182b:91a0 with SMTP id 38308e7fff4ca-305fedd0ef3mr56117721fa.7.1736710265470; Sun, 12 Jan 2025 11:31:05 -0800 (PST) Received: from smtpservice.6wind.com ([185.13.181.2]) by smtp-relay.gmail.com with ESMTP id 38308e7fff4ca-305ff116bd0sm2071451fa.24.2025.01.12.11.31.05; Sun, 12 Jan 2025 11:31:05 -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 1AE9713DA5; Sun, 12 Jan 2025 20:31:05 +0100 (CET) From: Ariel Otilibili To: dev@dpdk.org Cc: Stephen Hemminger , Thomas Monjalon , David Marchand , Ariel Otilibili Subject: [PATCH v2 5/6] net/hinic: remove check around pthread_mutex_init() Date: Sun, 12 Jan 2025 20:30:42 +0100 Message-Id: <20250112193043.67372-6-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/hinic/base/hinic_compat.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h index ab9d1b9a0214..8f5763fbfc9d 100644 --- a/drivers/net/hinic/base/hinic_compat.h +++ b/drivers/net/hinic/base/hinic_compat.h @@ -200,13 +200,9 @@ static inline u16 ilog2(u32 n) static inline int hinic_mutex_init(pthread_mutex_t *pthreadmutex, const pthread_mutexattr_t *mattr) { - int err; - - err = pthread_mutex_init(pthreadmutex, mattr); - if (unlikely(err)) - PMD_DRV_LOG(ERR, "Fail to initialize mutex, error: %d", err); + pthread_mutex_init(pthreadmutex, mattr); - return err; + return 0; } static inline int hinic_mutex_destroy(pthread_mutex_t *pthreadmutex) -- 2.30.2