From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D912FA04B7; Wed, 16 Sep 2020 15:38:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7F3351C2A3; Wed, 16 Sep 2020 15:38:17 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 398611C2A3 for ; Wed, 16 Sep 2020 15:38:16 +0200 (CEST) IronPort-SDR: 1QJrTVUYyifv9/WQeFVNg7KGOXT67Mo2N6jEuju93baefWMbBVVQXQGCNc8A5LKK5vABn1JTbT kABYirIDN/UA== X-IronPort-AV: E=McAfee;i="6000,8403,9745"; a="221016582" X-IronPort-AV: E=Sophos;i="5.76,433,1592895600"; d="scan'208";a="221016582" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2020 06:38:14 -0700 IronPort-SDR: YeXaw+HNGSQVCREIvbOkR660wnuYOUNYTvUM/f0KIgmJqeFmzZchfqtuSYOTeLiR2Az0zVGT+6 rhQ4oRfVo+mA== X-IronPort-AV: E=Sophos;i="5.76,433,1592895600"; d="scan'208";a="451857086" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.213.216.44]) ([10.213.216.44]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2020 06:38:13 -0700 To: wangyunjian , dev@dpdk.org Cc: jerry.lilijun@huawei.com, xudingke@huawei.com References: <677e6331b63389275fb1b1009fbea5642028e506.1600259975.git.wangyunjian@huawei.com> From: "Burakov, Anatoly" Message-ID: <884010e4-a9ef-9ff3-5a7f-67fd75ad393c@intel.com> Date: Wed, 16 Sep 2020 14:38:11 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <677e6331b63389275fb1b1009fbea5642028e506.1600259975.git.wangyunjian@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] vfio: remove unnecessary explicit type casting X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list 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 16-Sep-20 1:41 PM, wangyunjian wrote: > From: Yunjian Wang > > The variables 'vfio_res->nb_maps' and 'i' are of type int. The type > casting of 'vfio_res->nb_maps' is redundant and not required. > > Signed-off-by: Yunjian Wang > --- I wonder if we should make vfio_res->nb_maps to be an unsigned int instead. I don't think we ever expect number of mappings to be negative... -- Thanks, Anatoly