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 1501943E2C; Tue, 9 Apr 2024 18:38:20 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF908402C7; Tue, 9 Apr 2024 18:38:19 +0200 (CEST) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mails.dpdk.org (Postfix) with ESMTP id DC5E24025D for ; Tue, 9 Apr 2024 18:38:18 +0200 (CEST) Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-1e2c725e234so33632635ad.1 for ; Tue, 09 Apr 2024 09:38:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1712680698; x=1713285498; 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=mTlly5JjDn8+E7SXHdDCfzkwCjrj4kB7Ih1JQZsJstk=; b=VMvHawTvAPrM0XutxvfwIj/H+R1uyu+W6EBZB0q5on75YJLzFPxvnHv7uw/7x48DJJ ky0pAiyr5gin0AMeyUXTAMqwJ3qt9K0h3DWamghOoxNegq8hCo+lJJP8jy+Bi+gyN+eE 8Fu7O3ygYbu0RVzaiF1dxbsJyioZRbi6uxqRyWVF/bw/EJORh00zpieZgwN33orIKZUe wqtnUbNdz+edrd0TH5voJ4xpyaqc9ooAEr7aFa2d81c3Su/1PSKoVpnoybwl2LROisI6 BQt3/yfgaaHHaO/No+6jYrpIw5yeyYa/SWo1PT8c/GnnDpS4nun8xbpmVk4ja3WYjTc/ lSdA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712680698; x=1713285498; 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=mTlly5JjDn8+E7SXHdDCfzkwCjrj4kB7Ih1JQZsJstk=; b=j1BaqkT7lCKbn7ttT8Eo2Zy6dq4/VHiwAF6p007wB+dZcX8EWKozPQspFU130cDtTu RQv+hlcVoF/XyX/2x9zPix/xrH3XFWQXPmuxKj2v8Vsb3SqL1FDgRj2434+DUoZrbBeD m1nTvagIEzLXaPYIBWBB6PC3R1b/LVe4MRbDCtxXjWXqnATJoTpcppXPD6Fosh+ryI6A KASVCq21p4pGRYnegIkxhsxIvi5WVN4gAMiWO5Uq8KJtAmIDyFY5dESajRlKArr+EpH1 m4EmSwv7N19KvU+EMavES2J148zhtXTIepcJovIyu+VShNGanDdHZ0WXE2gVHtZNM6zn XbIQ== X-Gm-Message-State: AOJu0YwNXEw81BHF+At6mb+9Y+z+XC1wPYr4Hk06MuLzMu87cNBXcMYi O8pOnsAL9VRohF7qFZ7rezgRC0oSHdV7XLLsmt9Fq8RBkuP5fH0ua2ToYAq6cKE= X-Google-Smtp-Source: AGHT+IFTdNSqLjjInEdyaPD0aMyZrYCcYMkiYue3+4gUNwHikmT2kzQYJzT8EMjyCPJeK92g3sjssQ== X-Received: by 2002:a17:902:e842:b0:1e2:36d1:33fd with SMTP id t2-20020a170902e84200b001e236d133fdmr4811786plg.27.1712680698095; Tue, 09 Apr 2024 09:38:18 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id im22-20020a170902bb1600b001e3c01dfaf5sm9092806plb.24.2024.04.09.09.38.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 09:38:17 -0700 (PDT) Date: Tue, 9 Apr 2024 09:38:16 -0700 From: Stephen Hemminger To: Maxime Coquelin Cc: dev@dpdk.org, david.marchand@redhat.com, chenbox@nvidia.com Subject: Re: [PATCH v3 2/5] vhost: make use of FD manager init function Message-ID: <20240409093816.6065254b@hermes.local> In-Reply-To: <20240409114845.1336403-3-maxime.coquelin@redhat.com> References: <20240409114845.1336403-1-maxime.coquelin@redhat.com> <20240409114845.1336403-3-maxime.coquelin@redhat.com> 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 Tue, 9 Apr 2024 13:48:42 +0200 Maxime Coquelin wrote: > -void > +int > fdset_init(struct fdset *pfdset) > { > int i; > > if (pfdset == NULL) > - return; > + return -1; This test is unnecessary. The function is not exported, and therefore can only be called from vhost library. And all call sites are passing a pointer to local data. Adding extra parameter checks to internal functions bloats code and creates lots of untestable paths. Coverity might even be smart enough to detect these.