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 C5C775A89 for ; Sun, 26 Jun 2016 15:48:35 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP; 26 Jun 2016 06:48:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,531,1459839600"; d="scan'208";a="725236860" Received: from dpdk06.sh.intel.com ([10.239.128.225]) by FMSMGA003.fm.intel.com with ESMTP; 26 Jun 2016 06:48:33 -0700 From: Jianfeng Tan To: dev@dpdk.org Cc: yuanhan.liu@linux.intel.com, huawei.xie@intel.com, stephen@networkplumber.org, Jianfeng Tan Date: Sun, 26 Jun 2016 13:48:13 +0000 Message-Id: <1466948893-11887-1-git-send-email-jianfeng.tan@intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1466667620-67731-1-git-send-email-jianfeng.tan@intel.com> References: <1466667620-67731-1-git-send-email-jianfeng.tan@intel.com> Subject: [dpdk-dev] [PATCH v2] net/virtio-user: fix implicit int to enum conversion 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: Sun, 26 Jun 2016 13:48:36 -0000 Implicit int to enum conversion is not allowed when icc is used as the compiler. It raises the compiling error like, /.../dpdk/drivers/net/virtio/virtio_user/vhost_user.c(257): error #188: enumerated type mixed with another type msg.request = req; ^ The fix is simple, change the type of parameter req to enum vhost_user_request. Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer") Suggested-by: Stephen Hemminger Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_user/vhost.h | 2 +- drivers/net/virtio/virtio_user/vhost_user.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio/virtio_user/vhost.h b/drivers/net/virtio/virtio_user/vhost.h index 897042f..7adb55f 100644 --- a/drivers/net/virtio/virtio_user/vhost.h +++ b/drivers/net/virtio/virtio_user/vhost.h @@ -139,7 +139,7 @@ struct vhost_user_msg { #define VHOST_USER_F_PROTOCOL_FEATURES 30 #define VHOST_USER_MQ (1ULL << VHOST_USER_F_PROTOCOL_FEATURES) -int vhost_user_sock(int vhostfd, uint64_t req, void *arg); +int vhost_user_sock(int vhostfd, enum vhost_user_request req, void *arg); int vhost_user_setup(const char *path); int vhost_user_enable_queue_pair(int vhostfd, uint16_t pair_idx, int enable); diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c index 95e80f8..a2b0687 100644 --- a/drivers/net/virtio/virtio_user/vhost_user.c +++ b/drivers/net/virtio/virtio_user/vhost_user.c @@ -240,7 +240,7 @@ static const char * const vhost_msg_strings[] = { }; int -vhost_user_sock(int vhostfd, uint64_t req, void *arg) +vhost_user_sock(int vhostfd, enum vhost_user_request req, void *arg) { struct vhost_user_msg msg; struct vhost_vring_file *file = 0; -- 2.1.4