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 E030D4603A; Sun, 12 Jan 2025 20:31:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 305EB40615; Sun, 12 Jan 2025 20:31:05 +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 79B1E402F2 for ; Sun, 12 Jan 2025 20:31:03 +0100 (CET) Received: by mail-lf1-f100.google.com with SMTP id 2adb3069b0e04-54263b52b5aso3671748e87.1 for ; Sun, 12 Jan 2025 11:31:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736710263; x=1737315063; 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=YgYn2HltxeAmi2azgMwZgef4EDbOHoUIclHf3gqjm94nUuLgPikH2SVqcVE/DB2Hgb F5mlsGStchpBpMNt0Oq3yDIOqY1FuXo/5gSm+oUMNcT8iV4o5sIKExa+FwMGgRisOCUO XCxZ7axFVfLk7+ZEN2i7G6jNgRgWreC7sNCqJxgsvXg8QJ2swz89M+MBzfLngJa8HtG0 su678lpqp+2kdbki3/lFDMZmclnPUCEGTjBwy3j3Kg45avD3A7Nqx024sYScYEM3NE0N EzUdl9cNCaeTlsQgek6MTQdD2ybIxxULEZijIfcS31TWSx+hX5khAcit1L3yN45UdiXb BuAg== X-Gm-Message-State: AOJu0YyPDyIPMfzi9X0w4GjW0wRZP4axFR3DVMxyzdy/enzAmCgEVo5t CYkqMwbgUfnSfMvhsL9r1S6R8CvvgvwNVVNdOHZovlA15fudrnfkHGrHzOIyJZLlG/URi3TnqKy IpxQwxeeIW+KKYCKhuyrLVRgKjapQXu+edec1jtif X-Gm-Gg: ASbGnctccmTg9oxpqREl+yuDYCL73AF2PBEd0iP2+B11JptmPqQnjm2dqQGcZ0JGpct uFkccR3CdngUpbU3zrsTxIRuiB+0mtdNygYxhU2uMFQnkmYlFXlzhW0NLScOUQQfhgQtPGA5j3m lOFrQp5rlWFOj5bLBVpQU+ltBZHwnOiAdNCMN8jbPCuZs4oNJ+O7wTuPCekXhZE8yo2juaBfR2u UYrGoqRQNMW4NWI9Z/TrqvlfIKwqrd+u2YTawn7wN9mIDxsnw6P6EP/GqNH170EYjDTgtPUtR0u jnlZZNv49zOIcb4kjJPTHQIybA== X-Google-Smtp-Source: AGHT+IH+sE9d+ptNh1mB9nHiW1g5nLdL8I27HpmFy3dhkJnxUadCtFNPAI+HEyUZBvYV+Fq0J0JBP6hocnSJ X-Received: by 2002:a05:6512:b87:b0:540:357a:5d85 with SMTP id 2adb3069b0e04-542847fe865mr5364588e87.38.1736710262992; Sun, 12 Jan 2025 11:31:02 -0800 (PST) Received: from smtpservice.6wind.com ([185.13.181.2]) by smtp-relay.gmail.com with ESMTP id 2adb3069b0e04-5428be43c5esm314323e87.61.2025.01.12.11.31.02; Sun, 12 Jan 2025 11:31:02 -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 9E4F313DA3; Sun, 12 Jan 2025 20:31:02 +0100 (CET) From: Ariel Otilibili To: dev@dpdk.org Cc: Stephen Hemminger , Thomas Monjalon , David Marchand , Ariel Otilibili Subject: [PATCH v2 3/6] common/cnxk: remove check around pthread_mutex_init() Date: Sun, 12 Jan 2025 20:30:40 +0100 Message-Id: <20250112193043.67372-4-otilibil@eurecom.fr> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20250112193043.67372-1-otilibil@eurecom.fr> References: <20250112185842.9752-1-otilibil@eurecom.fr> <20250112193043.67372-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