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 B450842D76; Wed, 28 Jun 2023 00:17:35 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8A0BD406B3; Wed, 28 Jun 2023 00:17:35 +0200 (CEST) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by mails.dpdk.org (Postfix) with ESMTP id B13E640151 for ; Wed, 28 Jun 2023 00:17:33 +0200 (CEST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 5975A5C0082; Tue, 27 Jun 2023 18:17:33 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 27 Jun 2023 18:17:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1687904253; x=1687990653; bh=k0eQ0B9t0pwsuOwlBR9JCA6Z0y92NC0kIde tXgy91jk=; b=KQp9o0QaPCjOX89yo7FP0dJRoME1kGf+uTFnbmP38aLLY3gxva7 s3oLAf5Wl7DNfbvPE6WdXfj+YpJIIk4dG9sse0a0/n/OyZF/a2pWtSA9WQvy+4u1 4SVmNh0GiY8mF7DoAAsZAFCBBpsozoZWZtAsGtjKio15azW80fUHMx2VCcmErBAH ZTaJzNnyTtl2IN+BgD94rFjUuKOMFoRXxbBHZ4j4jocpj3K7PQLewnIGGOo6EbEW j+YKEH35H6BUDwGuZEZzGG9xm7mLKGM3EVL+de36ZeEu6DsbfMo/z+XX4uGFGh9W Ji91mnRLe2wq56BwIx4CPwHqjV3qyaXoA5Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1687904253; x=1687990653; bh=k0eQ0B9t0pwsuOwlBR9JCA6Z0y92NC0kIde tXgy91jk=; b=XLypcjY9plfaJ7uwSt4x2bDbNVj0W3Fdn2CzjcszvePlCB3yNVb eCfotLMmIAVofA3kPwUI+0PdGa2L90+iqMvP7HrVeiY8A6exrl1M3uO7cZFAN4JL JY0WVUYrhFBkI4aj0UDCFNDJkZjzwg3wqw6sEWbCJ5dR/yWH+zL1OP0LsFnGnXup zfRQdQXZzLqAbqXGvlLggtmvPs67oXbbLwrTde0RHh05Mq+Xatf3evJI9Ni9sH4F vgPne4TW+1V+UjtHwhtuyb1qCZRSTBK9xB8kbQo/INhEysvkYEwZ3NFEb53mtqi2 o97r/0C1Lj+nNuhGnOPtEWqdY7eUEmHfBMg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrtddugddtkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddtieek gfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 27 Jun 2023 18:17:32 -0400 (EDT) From: Thomas Monjalon To: Amit Prakash Shukla Cc: dev@dpdk.org, Nithin Kumar Dabilpuram , Pavan Nikhilesh Bhagavatula , "dev@dpdk.org" , Jerin Jacob Kollanukkaran Subject: Re: [EXT] Re: [PATCH] lib: fix coverity for unused variable Date: Wed, 28 Jun 2023 00:17:29 +0200 Message-ID: <3032049.kC03pvyZki@thomas> In-Reply-To: <3192443.l52yBJDM9G@thomas> References: <20230616110640.3642684-1-amitprakashs@marvell.com> <3192443.l52yBJDM9G@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 27/06/2023 23:52, Thomas Monjalon: > 27/06/2023 18:05, Amit Prakash Shukla: > > From: Thomas Monjalon > > > 16/06/2023 13:06, Amit Prakash Shukla: > > > > Removed variable "rc" that stored a return value from a function > > > > rte_lpm6_lookup_bulk_func. > > > > > > You are not really removing the variable, right? > > > It looks you just stop storing the return of this function. > > > Whouldn't it better to check the return code? > > > > Yes, I am just not storing the return value. The reason to not > > store return code is to avoid return code check in datapath. > > rte_lpm6_lookup_bulk_func will return error only if > > lpm6, ip_batch, next_hop are NULL. In function ip6_lookup_node_process_scalar > > these variables will never be NULL. > > I will update the commit message accordingly. Applied with updated explanation: node: remove useless return code assignment No need to store the return code of rte_lpm6_lookup_bulk_func() as it returns error only if parameters are NULL. In the function ip6_lookup_node_process_scalar(), these variables will never be NULL. Not checking the return code will avoid check in datapath. Storing of the return code is useless and removed.