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 0AD6046077; Mon, 13 Jan 2025 20:11:53 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A89F94025D; Mon, 13 Jan 2025 20:11:52 +0100 (CET) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mails.dpdk.org (Postfix) with ESMTP id AA49B4025A for ; Mon, 13 Jan 2025 20:11:50 +0100 (CET) Received: by mail-pj1-f53.google.com with SMTP id 98e67ed59e1d1-2ef87d24c2dso6196975a91.1 for ; Mon, 13 Jan 2025 11:11:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1736795510; x=1737400310; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=uQmH5yLMshYGne+98DPS4xe3OiOJ9AS7MbfXQoiPzrw=; b=YWN+xOMbDr0Fqxh9we3d6sSnvCxPHGSCA2Dyb85kR3euYB/Hb0fScx9cz7/A88uwgQ O86z10rjUdR2AklGfRS7QWzWR7hebmYlPi0Kkxd6jc/E/GUOep4GnswFvIf2SpNmJEqx dPGO3Ne2yf3O763Up7FgEogN4rG2dJt4mpQ9kxNz+ABjCAPsQ+BNPF49p2WDqv9qvmho Xre602QD2q3sb25pWLddCYfx53uEeim0/TIYpY8FknRxFQa+bbGLl2X7zHa5i8xCjWHV Jm8pPO0+DZPWn1w3uhjC1/gN545wG5cFpgSnK/DhnUhXSWAR9u//HWcU91a6t24yAF6s 0PDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736795510; x=1737400310; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=uQmH5yLMshYGne+98DPS4xe3OiOJ9AS7MbfXQoiPzrw=; b=Gn+iyX4DZbsLgAIBB/2t80i+n41hvS8mqiqjAxeETTqGA99+jVYjlKrKWBRNrj9POT 15u3Rfycn1z2r1SJECzVbrZ8quzWLe+6whZ5KSxxdmm2nFZ5Ay/jnc4pCBTIjLoQU/dz hZ2ZypgGlIyXxDroMf8Lxa+xgf259Fk5KCFoH4N2DrOrvX/Oi1uvUcTEQO/2hvaLWEWR mJMGBAyqQ8CA5CMl+tTG3xnSH63J5J9DZvyMqWwcmSUgdsGHUbmonan9Ssiwj2magoKu x4XnVSmjtYnY2bjf8ob2tvpo4yUeH1a+rRUyV77Oy9k0HVonN9pkLH5Twn+QdtifZTB7 fTQQ== X-Gm-Message-State: AOJu0YwbIebJMkybkCa6fJl3/Lfo0QpHd1bYbkEU1X3PVZuBEzY5HQ2v WekfkdXGSI4EU8Kd7F/CGlWfrsMuMIQN5k1IJVE73FanznTrMOMt9KwhbUefwLU= X-Gm-Gg: ASbGncuH4YKgTpBnDaVhcUpv8B7aiG41o7VaxOXa4hqBTAnWrEu4FeHK1urdZM8TFvw WYJuMNg1AKCwYM7ecyA8nycYv2b8LJrClIeOxOz7ZLXVhfeTr843E1IoR0F9ZHdLPA9+km2iSwz YGe57gyY5FvqDrnet974fxEqKjmu686Q6q5Ew+YRYloP/85BR5cRv8g9zfHQLI70tGInAmnTgvR yOOaNtqeVYUx0N7cEpOXIkubBWaouGomBiltS9/kuv/odrDs/7gKN6MrfyUN2/ajIciDbvhGBjP hjCgwMuODv+Ad93pT5/ZScPs643+VoocLQ== X-Google-Smtp-Source: AGHT+IH2UbBW+GC2eGS0nnEN5DLivALcqxNkoemS2wQIU/j7+PUqcqUkE/Qa/9DOqyBs7pbpE3/4cQ== X-Received: by 2002:a17:90b:2504:b0:2f5:88bb:118 with SMTP id 98e67ed59e1d1-2f588bb01c8mr12847484a91.22.1736795508212; Mon, 13 Jan 2025 11:11:48 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f5593d0911sm9005139a91.8.2025.01.13.11.11.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jan 2025 11:11:47 -0800 (PST) Date: Mon, 13 Jan 2025 11:09:52 -0800 From: Stephen Hemminger To: Ariel Otilibili Cc: dev@dpdk.org, Thomas Monjalon , David Marchand Subject: Re: [PATCH v3 5/6] net/hinic: remove check around pthread_mutex_init() Message-ID: <20250113110952.3b8af2c6@hermes.local> In-Reply-To: <20250112202021.179634-6-otilibil@eurecom.fr> References: <20250112185842.9752-1-otilibil@eurecom.fr> <20250112202021.179634-1-otilibil@eurecom.fr> <20250112202021.179634-6-otilibil@eurecom.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 On Sun, 12 Jan 2025 21:20:20 +0100 Ariel Otilibili wrote: > diff --git a/drivers/net/hinic/base/hinic_compat.h b/drivers/net/hinic/base/hinic_compat.h > index ab9d1b9a0214..8f5763fbfc9d 100644 > --- a/drivers/net/hinic/base/hinic_compat.h > +++ b/drivers/net/hinic/base/hinic_compat.h > @@ -200,13 +200,9 @@ 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); > + pthread_mutex_init(pthreadmutex, mattr); > > - return err; > + return 0; > } Could be a tail call here, if you want. return pthread_mutex_init(pthradmutex, mattr);