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 319FFA04B7; Wed, 16 Sep 2020 16:14:22 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0FB3D1C2A7; Wed, 16 Sep 2020 16:14:21 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id D033D1C2A3 for ; Wed, 16 Sep 2020 16:14:19 +0200 (CEST) IronPort-SDR: Fm+2VUykn6U1PfrSVvJDtKa9u/iGRkoelpFG0+ePL9jXk0Y0OwaXJdNSEazbarIZbMTWzpOX99 9daGmg5wa9/g== X-IronPort-AV: E=McAfee;i="6000,8403,9745"; a="158748380" X-IronPort-AV: E=Sophos;i="5.76,433,1592895600"; d="scan'208";a="158748380" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2020 07:14:18 -0700 IronPort-SDR: As6pw1GfVRfEhJW53YdU47tEyYUYcsP7dG1eTO0QsZugaxJQj2fXLoMykDazvDSqbfAX29295Q vLy5M/TIYp4A== X-IronPort-AV: E=Sophos;i="5.76,433,1592895600"; d="scan'208";a="451873881" 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 07:14:16 -0700 From: "Burakov, Anatoly" To: wangyunjian , dev@dpdk.org Cc: jerry.lilijun@huawei.com, xudingke@huawei.com References: <677e6331b63389275fb1b1009fbea5642028e506.1600259975.git.wangyunjian@huawei.com> <884010e4-a9ef-9ff3-5a7f-67fd75ad393c@intel.com> Message-ID: <0b39f42c-0b13-93c1-6183-40f2a398d510@intel.com> Date: Wed, 16 Sep 2020 15:14:15 +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: <884010e4-a9ef-9ff3-5a7f-67fd75ad393c@intel.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 2:38 PM, Burakov, Anatoly wrote: > 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... > Just checked the code, this would be a big reword as there's lots of other places we do this, so for now i'm inclined to leave it be and remove the unnecessary casts instead. So, Acked-by: Anatoly Burakov -- Thanks, Anatoly