From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBAC142A9A; Thu, 28 Mar 2024 17:24:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711646670; cv=none; b=b5fv2JjuTjXlZNBfY2cXTj7CixVSEyiGU6hThORphPe++MlmIhUiJsMy6DmTNiSyDQEPULQwpnRj2ppV67bWn975Gi/Ln4I4nVEvOuG0/+oHYiQtI6anUjEeHpaYyT+ACZfRNtTHUSRO4xFomBDa0j66vUPhxRr1rGL1Dcq5NbY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711646670; c=relaxed/simple; bh=2siyeS6uzlQMyBU1hT15aszZzeb4J26W0sbBxAvcBso=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qlBVwdCWXaK2FD31GEhE5IyFmkk4X0FeBWKawBdoe8fn2ES7G93TsHX9JtlofzV8r5tzQPNfh27Xt6uBkyFvHdqYkNKny53gjKnyFE73SGRIlpwCfOjm5CmOtjvBDBORV9jyXvvbxEjGDsaPriL84yKVJYDyyadBfLVZDVlRp1s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EsQUQGBJ; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EsQUQGBJ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F12CC433C7; Thu, 28 Mar 2024 17:24:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711646669; bh=2siyeS6uzlQMyBU1hT15aszZzeb4J26W0sbBxAvcBso=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EsQUQGBJqiyE5TBBV1xaMlo03QpVAjoKOs2v+yc9h3SArZNhlqDqOXHBukxqB1MXx mSnrkDZwp1EJRG/GjTmvIuuZFgvtgDPb9iU4m9v7fEXuBOeqXBL0UpY9f+Z60FbZiu Xx8jLPPfa1xXXjofs2s7fczcr9fEWhpQeSI329bsb1I7LJDipgT20fgmDesJxlTlZC BbWF9m789tpHEeAvD4v5nA6YVBxNju9Y0EGeyzE/JURIUvw6s7i1F7SCMtBjJenKeo sUh70/IgAKTKQ4w1h8tAR19+lwIYB8btXTAp3RwJpRc7u+AiLakViYUF3Hfq4PcIoU p50lOWz5kcoWw== Date: Thu, 28 Mar 2024 17:24:25 +0000 From: Simon Horman To: Ivan Vecera Cc: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, mschmidt@redhat.com, aleksandr.loktionov@intel.com, jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Subject: Re: [PATCH iwl-next v2 5/7] i40e: Consolidate checks whether given VSI is main Message-ID: <20240328172425.GE651713@kernel.org> References: <20240327075733.8967-1-ivecera@redhat.com> <20240327075733.8967-6-ivecera@redhat.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240327075733.8967-6-ivecera@redhat.com> On Wed, Mar 27, 2024 at 08:57:31AM +0100, Ivan Vecera wrote: > In the driver code there are 3 types of checks whether given > VSI is main or not: > 1. vsi->type ==/!= I40E_VSI_MAIN > 2. vsi ==/!= pf->vsi[pf->lan_vsi] > 3. vsi->seid ==/!= pf->vsi[pf->lan_vsi]->seid > > All of them are equivalent and can be consolidated. Convert cases > 2 and 3 to case 1. > > Reviewed-by: Michal Schmidt > Signed-off-by: Ivan Vecera Reviewed-by: Simon Horman