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 3AA5446060; Sun, 12 Jan 2025 19:59:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 34C1C402F2; Sun, 12 Jan 2025 19:59:05 +0100 (CET) Received: from mail-ej1-f100.google.com (mail-ej1-f100.google.com [209.85.218.100]) by mails.dpdk.org (Postfix) with ESMTP id 39DA1402F1 for ; Sun, 12 Jan 2025 19:59:03 +0100 (CET) Received: by mail-ej1-f100.google.com with SMTP id a640c23a62f3a-aaf0f1adef8so765521966b.3 for ; Sun, 12 Jan 2025 10:59:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736708343; x=1737313143; 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=Prp5DhhkKef/YZ0/IjIUOM/3AEdm401vhii6An9EjMR8cxQ+5KD4kLXGXarlPsa6vg E+GBR+9NOupUzx/THfg4KPCdwLH8Aahyd3dFch+cmH7r4ZiYah4xSPLyr0dsQf5UmeDF qjotY4WRfHyUQmbuHw/7WcT7W64BEB8B1NJ7RxxVyQc8VJ+Q4BnHKXSVKzhH4KEGXyHy D56o8yF4SDcUDa7UVHXAt+uNQHZW2RbD0LSMLvnOVfaQr50zrDdY3OA8zuLua3zWtlWh E1IpLh/vUZcKiX2VkxZv8JMOVOUW/QWYBosI1d6H9LGaQWuWEqMdJRnTU2P1Y9vraq2T 1k6A== X-Gm-Message-State: AOJu0YxTWrFyWhakkDeVgwLe26yynn9u0pGSRl/1rKkOMYTGNCPeG0Nc NLyzLmosgGTcxLxPO5UXayYEh1zhAEw9XztyfK6PeHzCa/WxbCICXncCaHlaFs+S6ikc+wfYjmc pDC+GWOH5lz+ByhekBYGO1OgjHh2i8PZBCWp5/XSw X-Gm-Gg: ASbGncut3I1ZWaxitucODBYBtq9JIxVGMsXQJaZiRrVkWaR5/ehdc7FiqKzWgTy/Had pQiu577kbpy62qqUCQs3kL7fMdeCzyoUW47EeZIzMvA9Z7odxIfU35mT9oaox3BWjh6WpdXf8h8 Gat5p+e6PiPlLz205W1b/yVBr8/Q+GS6SKvDpnMXV7XjLsDU4IuNbF1MhcJA6Y11HaPrzNU1sZL R8rVMaQBwCn1/tPlwM7flvdtYWfh9F8HAEoNsL0E/eOdfMgQoYTb1qyL+OZUskbmBZeNPorxWGC EmR2DDVO2uv2F8ngq6v4uZvCrA== X-Google-Smtp-Source: AGHT+IEnnuteIOJdRvESPV/m2lr49CU51/tfzLcgDHd5aO00nFjuklpwB4h0xKHJrRFsB8VKGXIppePnmb0q X-Received: by 2002:a17:907:3a96:b0:ab2:b5f1:568c with SMTP id a640c23a62f3a-ab2b5f15bf1mr1064090766b.28.1736708342401; Sun, 12 Jan 2025 10:59:02 -0800 (PST) Received: from smtpservice.6wind.com ([185.13.181.2]) by smtp-relay.gmail.com with ESMTP id a640c23a62f3a-ab2c90db319sm34918766b.60.2025.01.12.10.59.02; Sun, 12 Jan 2025 10:59: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 40BCB13D78; Sun, 12 Jan 2025 19:59:02 +0100 (CET) From: Ariel Otilibili To: dev@dpdk.org Cc: Stephen Hemminger , Thomas Monjalon , David Marchand , Ariel Otilibili Subject: [PATCH 3/6] common/cnxk: remove check around pthread_mutex_init() Date: Sun, 12 Jan 2025 19:58:39 +0100 Message-Id: <20250112185842.9752-4-otilibil@eurecom.fr> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20250112185842.9752-1-otilibil@eurecom.fr> References: <20250112185842.9752-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