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 8A2D346061; Sun, 12 Jan 2025 21:20:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C610A40667; Sun, 12 Jan 2025 21:20:40 +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 8BD9C40651 for ; Sun, 12 Jan 2025 21:20:38 +0100 (CET) Received: by mail-ed1-f98.google.com with SMTP id 4fb4d7f45d1cf-5d414b8af7bso6547878a12.0 for ; Sun, 12 Jan 2025 12:20:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736713238; x=1737318038; 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=cry9KQwSFHKF0o83bz/tmtZFcFuwLGChs3Ng4ZLV+Aw=; b=FLMcLn7eHQu5gCTbqu/vPBX9ByUWhhxmCaik7adtypFdvAqPiTD6MA2iImwh3vIHBx gVxC1Q4EX0K8/I2ZnveWg2Dk7MKGTxlTNp+80rzT6pvVbGdkWeBnHGa+weqEVuz7FUat +ieOEXWGgvmhCyrnSgQFbwvX836BYdLad/ndRVzyVsRb3bjp0lfvU86Dfk4sJdW7htRs wBp7xU098FbnXp94hePDU5ATEpAcs/zgZOuwrZuYqYePiiut2goYvMtgKHJTqzPLJ9nr G+8mgefSGbCdz3rzuWl6axDbo4KyFLFfXHEUXzQuCrZiDbO4+qUXXB03FY/oyiIVz8v6 MqEw== X-Gm-Message-State: AOJu0YyiP1Tj0+nT20bkTq6TJBL2qcsAz2IMwKk1W33Njc/Pj/bUYPOr +znijchvqVDDwyGta54A9wYmycQnlrP2uxZt1EqQ4Wd5Jk/4rw23SUXYMYNrCB2hzrS0AaWrh30 D4oYdlXhHsK3krZpM8AIj+uimdWiIUKAvICSRMBdH X-Gm-Gg: ASbGncvYMMXps3QiIJ9t10QZ5KSeXe8Jh03S8C0KUWFRGn9H4wadGEVuMl4/UnIpCg7 5KxsdMtl04snq+9aho0sIM/89SytprWIVj2PsEmOSVGv5PwVbuATpEnc0IoU59NKQgneVQH6Um1 wUrVIeKA0NDrKXpwDxxlzte2C4a9BaWQl9TKDMKn6T0tRhIagtD4wQIPBzJLFsbP3p63NBqd8vs vWPM43Gmf1yZRFIqmwnMTOXZQJdoTuW8SS9NvW1j8kzBhVq8EyHFGeN8qw1sf0Jll0oAxbHKlky koLoC06BglNXiNhkp3+B4VYkzA== X-Google-Smtp-Source: AGHT+IGtqzcFBzy/cDXBGg8Y03H1P6xvIDhCVjH7N/wq1fAPWJzrDAFm8Jg6p7YLtcAXxX1znMJVhz2va/ZI X-Received: by 2002:a17:907:3687:b0:aa6:7ab4:4597 with SMTP id a640c23a62f3a-ab2abca77a5mr1948147766b.39.1736713238231; Sun, 12 Jan 2025 12:20:38 -0800 (PST) Received: from smtpservice.6wind.com ([185.13.181.2]) by smtp-relay.gmail.com with ESMTP id a640c23a62f3a-ab2c905ef95sm37020866b.45.2025.01.12.12.20.38; Sun, 12 Jan 2025 12:20:38 -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 173E713DDD; Sun, 12 Jan 2025 21:20:38 +0100 (CET) From: Ariel Otilibili To: dev@dpdk.org Cc: Stephen Hemminger , Thomas Monjalon , David Marchand , Ariel Otilibili Subject: [PATCH v3 3/6] common/cnxk: remove check around pthread_mutex_init() Date: Sun, 12 Jan 2025 21:20:18 +0100 Message-Id: <20250112202021.179634-4-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/common/cnxk/roc_bphy_cgx.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/common/cnxk/roc_bphy_cgx.c b/drivers/common/cnxk/roc_bphy_cgx.c index 4f43605e1031..882cf654743b 100644 --- a/drivers/common/cnxk/roc_bphy_cgx.c +++ b/drivers/common/cnxk/roc_bphy_cgx.c @@ -189,14 +189,11 @@ int roc_bphy_cgx_dev_init(struct roc_bphy_cgx *roc_cgx) { uint64_t val; - int ret; if (!roc_cgx || !roc_cgx->bar0_va || !roc_cgx->bar0_pa) return -EINVAL; - ret = pthread_mutex_init(&roc_cgx->lock, NULL); - if (ret) - return ret; + pthread_mutex_init(&roc_cgx->lock, NULL); val = roc_bphy_cgx_read(roc_cgx, 0, CGX_CMRX_RX_LMACS); val = FIELD_GET(CGX_CMRX_RX_LMACS_LMACS, val); -- 2.30.2