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 B477D46060; Sun, 12 Jan 2025 19:59:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 01F0640616; Sun, 12 Jan 2025 19:59:10 +0100 (CET) Received: from mail-lf1-f100.google.com (mail-lf1-f100.google.com [209.85.167.100]) by mails.dpdk.org (Postfix) with ESMTP id D99E540612 for ; Sun, 12 Jan 2025 19:59:06 +0100 (CET) Received: by mail-lf1-f100.google.com with SMTP id 2adb3069b0e04-5401be44b58so3713288e87.0 for ; Sun, 12 Jan 2025 10:59:06 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736708346; x=1737313146; 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=O/UhpZwIF0s0n/ANFYmPeldquDtw2yBun5H/cRNy7DAE5DRA/mJ53kEfekQtOwzl2u OvjjHBY/t+piy7daqBjbXc7DSabAAO7cVfsxFV5W5EedV3xTSCuEImxZNJcjIAR3W5vv CAwShdPVie0Kusv4rDEeAFoPXHvUkDBsq45NvIPitDiltCKvBqL1Jd7wUZcyQ4ps67JE hg/kBipvpCHj8/TKXX+/zQA1IYlEWVXjo94ZPH3XjhzSRtb8nQImJji3hs23EX00fXBz oFIxphWpzes49lnlRjMx4sE8ImJ4QBgRcF7rn8UXkcjX1ihpsgDLMbhp/K94gViCXrmF yHPQ== X-Gm-Message-State: AOJu0YxclSw8D732BDE1m7gWM3JZIRPst2Wgi9ic5ipQHJG9tR5m5XOT jSrfJ5B5Lq/+cQhlVYggk/53PzN7j81t0PfbsQGbaIlzyMDLzL/DsGYwHWgczlvyOZ2jxqRf/XF 8jM9QjvXdFaFlIS6Wn080fAS5qBENa0WYQBJAMvHT X-Gm-Gg: ASbGnctwk/yOY6fgZeeDvH/fdWDLLvfGA8XA2KbMez37XcD+SLb1Wzuj5priXCVknWL Y3GAEol+MmJ5Qk6p+ymW2TKVX8kfZrOKBao0dOJV+NZW1+SGHCb20tDsjbKS9x3zxPj+SeD0KFy MkkbQmpvsd/UW6vEs9v2Smksmr/+3lF9Gi3jHQgqdLzPqV1X+2pBsRx4NeiNHyFzRosM6g9n2DX CEdFiHRy19H4BnA5gHuDwTMooVu9s5+GKcuGktt5P86QFKWpu5LyJ2CTu8xO+8c+Hisc2gzUvao vPSifNmHIMfR58ewlm1oI9nFwg== X-Google-Smtp-Source: AGHT+IGVOJz15wQ2VI3cfTxlzcSfBWz9+3pfImxqgmGY3/YGYKBmV9BYavSfgQcITvYUXHcxGBm2MhKK6aV/ X-Received: by 2002:a05:6512:3a83:b0:540:3561:8897 with SMTP id 2adb3069b0e04-542847fe870mr5491531e87.39.1736708346186; Sun, 12 Jan 2025 10:59:06 -0800 (PST) Received: from smtpservice.6wind.com ([185.13.181.2]) by smtp-relay.gmail.com with ESMTP id 2adb3069b0e04-5428be41996sm306099e87.58.2025.01.12.10.59.06; Sun, 12 Jan 2025 10:59:06 -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 C608313D7A; Sun, 12 Jan 2025 19:59:05 +0100 (CET) From: Ariel Otilibili To: dev@dpdk.org Cc: Stephen Hemminger , Thomas Monjalon , David Marchand , Ariel Otilibili Subject: [PATCH 5/6] net/hinic: remove check around pthread_mutex_init() Date: Sun, 12 Jan 2025 19:58:41 +0100 Message-Id: <20250112185842.9752-6-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/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