Remove unnecessary casts of void * pointers to a specfic type.

Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
---
 lib/librte_eal/bsdapp/eal/eal.c          | 4 ++--
 lib/librte_eal/linuxapp/eal/eal.c        | 2 +-
 lib/librte_eal/linuxapp/eal/eal_memory.c | 8 ++++----
 3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c
index fae6c7e0a..dbea0354c 100644
--- a/lib/librte_eal/bsdapp/eal/eal.c
+++ b/lib/librte_eal/bsdapp/eal/eal.c
@@ -195,7 +195,7 @@ rte_eal_config_create(void)
                rte_panic("Cannot mmap memory for rte_config\n");
        }
        memcpy(rte_mem_cfg_addr, &early_mem_config, sizeof(early_mem_config));
-       rte_config.mem_config = (struct rte_mem_config *) rte_mem_cfg_addr;
+       rte_config.mem_config = rte_mem_cfg_addr;
 }
 
 /* attach to an existing shared memory config */
@@ -220,7 +220,7 @@ rte_eal_config_attach(void)
        if (rte_mem_cfg_addr == MAP_FAILED)
                rte_panic("Cannot mmap memory for rte_config\n");
 
-       rte_config.mem_config = (struct rte_mem_config *) rte_mem_cfg_addr;
+       rte_config.mem_config = rte_mem_cfg_addr;
 }
 
 /* Detect if we are a primary or a secondary process */
diff --git a/lib/librte_eal/linuxapp/eal/eal.c 
b/lib/librte_eal/linuxapp/eal/eal.c
index d98d56d2f..266150c22 100644
--- a/lib/librte_eal/linuxapp/eal/eal.c
+++ b/lib/librte_eal/linuxapp/eal/eal.c
@@ -212,7 +212,7 @@ rte_eal_config_create(void)
                rte_panic("Cannot mmap memory for rte_config\n");
        }
        memcpy(rte_mem_cfg_addr, &early_mem_config, sizeof(early_mem_config));
-       rte_config.mem_config = (struct rte_mem_config *) rte_mem_cfg_addr;
+       rte_config.mem_config = rte_mem_cfg_addr;
 
        /* store address of the config in the config itself so that secondary
         * processes could later map the config into this exact location */
diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c 
b/lib/librte_eal/linuxapp/eal/eal_memory.c
index 657c6f449..90cc3224b 100644
--- a/lib/librte_eal/linuxapp/eal/eal_memory.c
+++ b/lib/librte_eal/linuxapp/eal/eal_memory.c
@@ -610,12 +610,12 @@ static int
 cmp_physaddr(const void *a, const void *b)
 {
 #ifndef RTE_ARCH_PPC_64
-       const struct hugepage_file *p1 = (const struct hugepage_file *)a;
-       const struct hugepage_file *p2 = (const struct hugepage_file *)b;
+       const struct hugepage_file *p1 = a;
+       const struct hugepage_file *p2 = b;
 #else
        /* PowerPC needs memory sorted in reverse order from x86 */
-       const struct hugepage_file *p1 = (const struct hugepage_file *)b;
-       const struct hugepage_file *p2 = (const struct hugepage_file *)a;
+       const struct hugepage_file *p1 = b;
+       const struct hugepage_file *p2 = a;
 #endif
        if (p1->physaddr < p2->physaddr)
                return -1;
-- 
2.11.0

Reply via email to