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 ED03F46061; Sun, 12 Jan 2025 21:21:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D79C740666; Sun, 12 Jan 2025 21:20:44 +0100 (CET) Received: from mail-ed1-f100.google.com (mail-ed1-f100.google.com [209.85.208.100]) by mails.dpdk.org (Postfix) with ESMTP id 892F54066C for ; Sun, 12 Jan 2025 21:20:43 +0100 (CET) Received: by mail-ed1-f100.google.com with SMTP id 4fb4d7f45d1cf-5d3f28a4fccso5230637a12.2 for ; Sun, 12 Jan 2025 12:20:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736713243; x=1737318043; 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=HtYJLGnT5QbxXCQ+GVfUszsngX+JX1GJbzsSfKuD6qwH9LgK0h85LjwvGskzmJ+1wq T/bWqlic/4Y6GbWd2jp5VPyyEgEZ7Ue1dBhK6KwMBz+FyomhToSpaJ5kR5jGIkgUV2zq mIPxn9YhpFo2H1uImA4qcwCIY2NPfPK5sB8YpooY9TYKRN84tUJ4m3BPCgBdd9Znc3qP hP42aI0y+r4PFtS02+fG1gawFkLyqIGK8sVNNokCDzI4l/RntZ2L6gaWcgJm2UOhp/Tp UVbIrrwiGx4O0pMVpV8TSeQo1o6IYuok5u7AecmbQ4LTd3OME2Q6jjOjoaNFVePoWt5F pk6Q== X-Gm-Message-State: AOJu0Yw69IDqRvqsd+lX9WR/vICJyKx+qNhI83Mtw4IIByOeCZv4UVD7 /wX3YLLcfV9Jk+mhHe9fsLWjqxJCxt2rIsU+8QE+pzLRyUGjb9caDp08yuQ7k/z1ODsxt/ISgqG dtlYv4R60WwNkq5rOYATpT3iWEyK1WWUp+GIBE5ka X-Gm-Gg: ASbGncssZTvneLv830QBf4sQeDg65TwrSAAeEJdyFpul2KnVx4K5XTvUz4SVejaffKI dsPGes6T71/zJbHoqp6WslGV9upWVqWjLpzW8eZmoGRiSQIkEr9VPHj31OlfPlXqlUXSws95iK2 Ur7a1Z2kv3ngbAtFq7NGLR9EvXkqSmGCWJthRjTZ44Sb6iQz7+tcXJXwzzitAjtP9l7yGQrAq11 m6ArZI4esaZlc8zNDLdzQd+kUKl2cf+zGvC/Gj84oK+Cg+9NCwFs4wiLHfriuUREPDt4QGkl1GD JLFgq7Ch1gdlRoD4sOEen+b8tw== X-Google-Smtp-Source: AGHT+IG/tn1YAo86x6pEpO695f81KGq3wzvsqQna7A6El2IpkBzOSeCWCi2UiO6JuBEgCxWVozhHQ5FBnjum X-Received: by 2002:a17:907:7e83:b0:aa6:9eac:4b8e with SMTP id a640c23a62f3a-ab2abc6de91mr2020655366b.41.1736713241652; Sun, 12 Jan 2025 12:20:41 -0800 (PST) Received: from smtpservice.6wind.com ([185.13.181.2]) by smtp-relay.gmail.com with ESMTP id a640c23a62f3a-ab2c905ed4asm35354466b.28.2025.01.12.12.20.41; Sun, 12 Jan 2025 12:20:41 -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 8070C13DDF; Sun, 12 Jan 2025 21:20:41 +0100 (CET) From: Ariel Otilibili To: dev@dpdk.org Cc: Stephen Hemminger , Thomas Monjalon , David Marchand , Ariel Otilibili Subject: [PATCH v3 5/6] net/hinic: remove check around pthread_mutex_init() Date: Sun, 12 Jan 2025 21:20:20 +0100 Message-Id: <20250112202021.179634-6-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/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