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 85A7746080; Tue, 14 Jan 2025 08:51:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2544F40663; Tue, 14 Jan 2025 08:51:00 +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 7D9DA40616 for ; Tue, 14 Jan 2025 08:50:58 +0100 (CET) Received: by mail-ed1-f98.google.com with SMTP id 4fb4d7f45d1cf-5d647d5df90so8659639a12.2 for ; Mon, 13 Jan 2025 23:50:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736841058; x=1737445858; 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=TKHkps7Z1z/ewbCs4bJ7Gt3eUPrrWSaPbwZTzTfX8bM=; b=wygb4yfj0uTbnD/lJvXepmb5t/y50YZ3fxiaHUidLoypAzpmaFg6DzniyLpzZlSRaI oQad0HAhTZr11Y56220Di4sRLpqDRuGRD1siHrSreOIhJo4+eUvA22Yg4mfyYocbEO+1 6MYQ6a9iUXVxfE1ASvpifkH+0C3B2NrLBu0MjryUm8rB9ucF3S711XDHYX8QtbPTSXGZ YAFLDY/id7ZZtPiSJ5SiTk11V5HijKupZXwtlfCoSqsLsOE8hfTCV3Cmj4stlQJTtvgb 5PxFqvfHmV2bxB+04A0Gr9PFMTGN4LUkKDLvOm0V5AAwq/3q7a8NVe3VPv2EueSWOlwA wfag== X-Gm-Message-State: AOJu0YyxVtgrylLtpKVAXOxfCNxoPkSdv6UcpF+pwvmGN7EzxJkFBb+Q xSwXlLsUW0reBO1zUJPkhAt9PgvnaDvvWqbGnwVHuDUz7TEwiLP44n6NGg8WpboSBMnD6OL4sj0 KwJLbLsN6s6z2yi3j5DaZvFWs1BENt/QhI9nUfKfd X-Gm-Gg: ASbGncsyJo5i74KdTlrdARn307+NbC5FQtNos4EzW8yIQOx3jhzeWmGoye55KihfYuE r4TEJ6bzdmY+yPPoyKTFKIqNwfsuOW1nkWnE1saa2xiBbFcNA4iHECrVKcwqvxrB5O9hMCPy3Ka Uya4HmLc1a3SfCi9g1FdLgjf1D1DkB9dchRfEVq4LFYy2FeupCZJsn9JlRUCH3zDG6yMQvZFyhb wQez6rSH9q1HQQqyiWHIvetSWPAUxEqoTU5C15vif/HS6tJ0ZmP5/66IUBPLqVxkDqa6lGRvL6N NHPaxhJOhSgCmaV3WCcM54YQyw== X-Google-Smtp-Source: AGHT+IHBZ1uIhFy4n/bTUZcognbnorPGLqPuNZdeinVHVwto23ihh1XZhhPh3JDWa2A9BlzRb5dmE9dU8Mad X-Received: by 2002:a17:907:2d8f:b0:aaf:8f8e:6bf4 with SMTP id a640c23a62f3a-ab2ab740899mr1658900766b.26.1736841058100; Mon, 13 Jan 2025 23:50:58 -0800 (PST) Received: from smtpservice.6wind.com ([185.13.181.2]) by smtp-relay.gmail.com with ESMTP id a640c23a62f3a-ab33b93a053sm4277166b.17.2025.01.13.23.50.58; Mon, 13 Jan 2025 23:50:58 -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 E4AE61027E; Tue, 14 Jan 2025 08:50:57 +0100 (CET) From: Ariel Otilibili To: dev@dpdk.org Cc: Stephen Hemminger , Thomas Monjalon , David Marchand , Ariel Otilibili , Ziyang Xuan , Xiaoyun Wang Subject: [PATCH v4 5/6] net/hinic: remove check around pthread_mutex_init() Date: Tue, 14 Jan 2025 08:50:32 +0100 Message-Id: <20250114075033.2027286-6-otilibil@eurecom.fr> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20250114075033.2027286-1-otilibil@eurecom.fr> References: <20250112185842.9752-1-otilibil@eurecom.fr> <20250114075033.2027286-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 Cc: Ziyang Xuan Cc: Xiaoyun Wang Signed-off-by: Ariel Otilibili Acked-by: Stephen Hemminger --- drivers/net/hinic/base/hinic_compat.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h index ab9d1b9a0214..d3994c50e939 100644 --- a/drivers/net/hinic/base/hinic_compat.h +++ b/drivers/net/hinic/base/hinic_compat.h @@ -200,13 +200,7 @@ 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); - - return err; + return pthread_mutex_init(pthreadmutex, mattr); } static inline int hinic_mutex_destroy(pthread_mutex_t *pthreadmutex) -- 2.30.2