From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH] vhost: allow for many vhost user ports Date: Wed, 7 Dec 2016 15:43:04 +0800 Message-ID: <20161207074304.GB31182@yliu-dev.sh.intel.com> References: <1480606010-6132-1-git-send-email-jan.wickbom@ericsson.com> <20161206065633.GQ24403@yliu-dev.sh.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "huawei.xie@intel.com" , "dev@dpdk.org" , Patrik Andersson R To: Jan Wickbom Return-path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 5FC762B96 for ; Wed, 7 Dec 2016 08:42:21 +0100 (CET) Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Dec 06, 2016 at 11:42:36AM +0000, Jan Wickbom wrote: > > > @@ -189,7 +206,7 @@ > > > pfdset->fd[i].fd = -1; > > > pfdset->fd[i].rcb = pfdset- > > >fd[i].wcb = NULL; > > > pfdset->fd[i].dat = NULL; > > > - pfdset->num--; > > > + (void) fdset_adjust_num(pfdset); > > > > Unncessary cast. > > I'd like to keep the cast. The function returns int and it's nice to show we deliberately > don't care. I know your point, but it's not needed. > No strong opinion though, but we should do the same everywhere. Please > see below. > > > > > > i = -1; > > > } > > > pthread_mutex_unlock(&pfdset->fd_mutex); > > > @@ -211,12 +228,12 @@ > > > > > > pfdset->fd[index].fd = -1; > > > pfdset->fd[index].rcb = pfdset->fd[index].wcb = NULL; > > > - pfdset->fd[index].dat = NULL; > > > - pfdset->num--; > > > + (void) fdset_adjust_num(pfdset); > > If we remove the cast above, we should remove this one as well. Yes. --yliu