From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 78B2EC3B4 for ; Wed, 11 May 2016 11:46:19 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 11 May 2016 02:46:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,608,1455004800"; d="scan'208";a="973348871" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.154]) ([10.237.220.154]) by orsmga002.jf.intel.com with ESMTP; 11 May 2016 02:46:17 -0700 To: "Dumitrescu, Cristian" , "Mrzyglod, DanielX T" References: <1462875064-119474-1-git-send-email-danielx.t.mrzyglod@intel.com> <3EB4FA525960D640B5BDFFD6A3D89126479BAF1D@IRSMSX108.ger.corp.intel.com> Cc: "dev@dpdk.org" From: Ferruh Yigit Message-ID: <5732FF68.50801@intel.com> Date: Wed, 11 May 2016 10:46:16 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <3EB4FA525960D640B5BDFFD6A3D89126479BAF1D@IRSMSX108.ger.corp.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH] sched: fix useless call X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 May 2016 09:46:19 -0000 On 5/10/2016 6:18 PM, Dumitrescu, Cristian wrote: > > >> -----Original Message----- >> From: Mrzyglod, DanielX T >> Sent: Tuesday, May 10, 2016 11:11 AM >> To: Dumitrescu, Cristian >> Cc: dev@dpdk.org; Mrzyglod, DanielX T >> Subject: [PATCH] sched: fix useless call >> >> Fix issue reported by Coverity. >> Coverity ID 13338 >> >> A function call that seems to have an intended effect has no actual effect >> on the logic of the program. >> >> In rte_sched_port_free: A function is called that is only useful for its >> return value, and this value is ignored. >> >> Fixes: de3cfa2c9823 ("sched: initial import") >> >> Signed-off-by: Daniel Mrzyglod >> --- >> lib/librte_sched/rte_sched.c | 1 - >> 1 file changed, 1 deletion(-) >> >> diff --git a/lib/librte_sched/rte_sched.c b/lib/librte_sched/rte_sched.c >> index 1609ea8..9b962a6 100644 >> --- a/lib/librte_sched/rte_sched.c >> +++ b/lib/librte_sched/rte_sched.c >> @@ -749,7 +749,6 @@ rte_sched_port_free(struct rte_sched_port *port) >> rte_pktmbuf_free(mbufs[i]); >> } >> >> - rte_bitmap_free(port->bmp); >> rte_free(port); >> } >> >> -- >> 2.5.5 > > NAK. > > This needs to be flagged out as a false positive to Coverity. > > As previously discussed on this email list, the rte_bitmap_free() is an API function that works as a placeholder for any resource freeing that needs to be done for the bitmap. The API function should not be removed and also the call to this function from the rte_sched_port_free() should not be removed either. > Right now it isn't required and doesn't do anything. Why not add this function when it is required? Anyway, if we will keep it, I believe it is good to add a comment that it is a placeholder, to prevent same confusion in the future. Regards, ferruh