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 19295A04C9; Wed, 16 Sep 2020 14:42:21 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0E52F1C299; Wed, 16 Sep 2020 14:42:20 +0200 (CEST) Received: from huawei.com (szxga06-in.huawei.com [45.249.212.32]) by dpdk.org (Postfix) with ESMTP id EB3A41C239 for ; Wed, 16 Sep 2020 14:42:18 +0200 (CEST) Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id 58D6E51808094B6BF4D2 for ; Wed, 16 Sep 2020 20:42:15 +0800 (CST) Received: from localhost (10.174.185.168) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.487.0; Wed, 16 Sep 2020 20:42:07 +0800 From: wangyunjian To: CC: , , , Yunjian Wang Date: Wed, 16 Sep 2020 20:41:56 +0800 Message-ID: <677e6331b63389275fb1b1009fbea5642028e506.1600259975.git.wangyunjian@huawei.com> X-Mailer: git-send-email 1.9.5.msysgit.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.174.185.168] X-CFilter-Loop: Reflected Subject: [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" 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 --- drivers/bus/pci/linux/pci_vfio.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/bus/pci/linux/pci_vfio.c b/drivers/bus/pci/linux/pci_vfio.c index c15ed3bad..85a51e3e2 100644 --- a/drivers/bus/pci/linux/pci_vfio.c +++ b/drivers/bus/pci/linux/pci_vfio.c @@ -750,7 +750,7 @@ pci_vfio_map_resource_primary(struct rte_pci_device *dev) } } - for (i = 0; i < (int) vfio_res->nb_maps; i++) { + for (i = 0; i < vfio_res->nb_maps; i++) { struct vfio_region_info *reg = NULL; void *bar_addr; @@ -875,7 +875,7 @@ pci_vfio_map_resource_secondary(struct rte_pci_device *dev) /* map BARs */ maps = vfio_res->maps; - for (i = 0; i < (int) vfio_res->nb_maps; i++) { + for (i = 0; i < vfio_res->nb_maps; i++) { ret = pci_vfio_mmap_bar(vfio_dev_fd, vfio_res, i, MAP_FIXED); if (ret < 0) { RTE_LOG(ERR, EAL, " %s mapping BAR%i failed: %s\n", @@ -934,7 +934,7 @@ find_and_unmap_vfio_resource(struct mapped_pci_res_list *vfio_res_list, pci_addr); maps = vfio_res->maps; - for (i = 0; i < (int) vfio_res->nb_maps; i++) { + for (i = 0; i < vfio_res->nb_maps; i++) { /* * We do not need to be aware of MSI-X table BAR mappings as -- 2.23.0