From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 09D898DB4 for ; Wed, 9 Sep 2015 04:49:34 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP; 08 Sep 2015 19:49:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,494,1437462000"; d="scan'208";a="801128729" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.66.60]) by fmsmga002.fm.intel.com with ESMTP; 08 Sep 2015 19:49:32 -0700 Date: Wed, 9 Sep 2015 10:52:46 +0800 From: Yuanhan Liu To: "Ouyang, Changchun" Message-ID: <20150909025246.GE2925@yliu-dev.sh.intel.com> References: <1440388485-13554-1-git-send-email-yuanhan.liu@linux.intel.com> <1440388485-13554-4-git-send-email-yuanhan.liu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH 4/4] vhost: define callfd and kickfd as int type 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, 09 Sep 2015 02:49:35 -0000 On Wed, Sep 09, 2015 at 02:41:37AM +0000, Ouyang, Changchun wrote: > > > > -----Original Message----- > > From: Yuanhan Liu [mailto:yuanhan.liu@linux.intel.com] > > Sent: Monday, August 24, 2015 11:55 AM > > To: dev@dpdk.org > > Cc: Xie, Huawei; Ouyang, Changchun; Yuanhan Liu > > Subject: [PATCH 4/4] vhost: define callfd and kickfd as int type > > > > So that we can remove the redundant (int) cast. > > > > Signed-off-by: Yuanhan Liu > > --- > > examples/vhost/main.c | 6 ++--- > > lib/librte_vhost/rte_virtio_net.h | 4 ++-- > > lib/librte_vhost/vhost_rxtx.c | 6 ++--- > > lib/librte_vhost/vhost_user/virtio-net-user.c | 16 +++++++------- > > lib/librte_vhost/virtio-net.c | 32 +++++++++++++-------------- > > 5 files changed, 32 insertions(+), 32 deletions(-) > > > > diff --git a/examples/vhost/main.c b/examples/vhost/main.c index > > 1b137b9..b090b25 100644 > > --- a/examples/vhost/main.c > > +++ b/examples/vhost/main.c > > @@ -1433,7 +1433,7 @@ put_desc_to_used_list_zcp(struct vhost_virtqueue > > *vq, uint16_t desc_idx) > > > > /* Kick the guest if necessary. */ > > if (!(vq->avail->flags & VRING_AVAIL_F_NO_INTERRUPT)) > > - eventfd_write((int)vq->callfd, 1); > > + eventfd_write(vq->callfd, 1); > > Don't we need type conversion for '1' to eventfd_t here? Nope. See eventfd_write man page: int eventfd_read(int fd, eventfd_t *value); int eventfd_write(int fd, eventfd_t value); --yliu