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 9456346080; Tue, 14 Jan 2025 08:51:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8309F4060C; Tue, 14 Jan 2025 08:50:56 +0100 (CET) Received: from mail-wr1-f100.google.com (mail-wr1-f100.google.com [209.85.221.100]) by mails.dpdk.org (Postfix) with ESMTP id C4F8F4042E for ; Tue, 14 Jan 2025 08:50:54 +0100 (CET) Received: by mail-wr1-f100.google.com with SMTP id ffacd0b85a97d-38633b5dbcfso5248218f8f.2 for ; Mon, 13 Jan 2025 23:50:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736841054; x=1737445854; 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=9am+HkQeGBb9UjPWWQrW6Z58kLUlD1+81bw/aqXAvjI=; b=v2erqmE7UTcNKhAUPIhbg9D9tCij7gBGMK5rMZSqtSkcapigG1tapFyqoBz748p4uN bFRB76c5/FD5rBxpuc2vDStszmbUloEFZkBpbAqlI+Hj69JgsAHFGNY3txIiAktLbpMO 65r1w8EhmJ4XopCQv8kdZ+Pu6nmsxAHQnLOZOGVUUWvrii8WgBVv17to6HmyQUtnmQ1M vMv3Z6dh2TVIMwXyFuMqdDjbFz447dBCQ4EnfNiHkcXKX6cOj/pOFfijO5CNs+mQyaZv WHKADnXFOdznSpaAUoUrsnrPeARZcuC9sZRhfdKc8cyJq9++/9/GNLFZex7O0yk6poUo tflw== X-Gm-Message-State: AOJu0Yz6jZ4IMzOF17FjgsXH3TNXmizj+b4ql+heKWWP9ogfU8j9/ybQ BY4tcd0DUfsgOeWZqTJq/153PkrEkC7+DD40JgU5ZQGxWC8cGSTZWrq2UXy+FV9yXQ3bX8mR45p Nha9PCGQwVgXkfRnd2gJsKkMBubHb632HKJkEvvPD X-Gm-Gg: ASbGncsy4S5DHOwnPWLtLTubXjrbWGYqgWSp86MDIKfT35mEMfN8X3gxeB/cbsIJhoD EuiMmV+b9ANwAOU37WfmD5Wv12orsUxcQlRVotQ1uKVukKdtqybWAGzqGSYAnbgk8vfaDd9pYCx 9i4xmf7jgv/63mB/KMwsQFzu+69Fl/3PwcG+7j9MeSVSSvGcH8tDCmKv9jB4sdAAEI8x3nve3L+ 5IpCLDW5yyXVcOGiYQnRpffdoVXZZf+2iyvKClnwRGUjtOymBCaCPNPki3jZsYXRgZJ17U1dIyl xi5X3TYbslkp8b+dhKRSeXFCag== X-Google-Smtp-Source: AGHT+IHZgUsIGyf5m3QNhNEAIW22Z+wNtBlreXN7b/v+gbqqaIu5Npd+ESLU8zkwIji9/00YZMfAq7MzQWCE X-Received: by 2002:a05:6000:184e:b0:382:46ea:113f with SMTP id ffacd0b85a97d-38a872fc1b3mr21671711f8f.10.1736841054292; Mon, 13 Jan 2025 23:50:54 -0800 (PST) Received: from smtpservice.6wind.com ([185.13.181.2]) by smtp-relay.gmail.com with ESMTP id 5b1f17b1804b1-436e736b40bsm11483755e9.36.2025.01.13.23.50.54; Mon, 13 Jan 2025 23:50:54 -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 2E8731027C; Tue, 14 Jan 2025 08:50:54 +0100 (CET) From: Ariel Otilibili To: dev@dpdk.org Cc: Stephen Hemminger , Thomas Monjalon , David Marchand , Ariel Otilibili , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Harman Kalra Subject: [PATCH v4 3/6] common/cnxk: remove check around pthread_mutex_init() Date: Tue, 14 Jan 2025 08:50:30 +0100 Message-Id: <20250114075033.2027286-4-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: Nithin Dabilpuram Cc: Kiran Kumar K Cc: Sunil Kumar Kori Cc: Satha Rao Cc: Harman Kalra Signed-off-by: Ariel Otilibili Acked-by: Stephen Hemminger --- 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