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

Signed-off-by: Stephen Hemminger <step...@networkplumber.org>
---
 test/test-pipeline/pipeline_hash.c | 2 +-
 test/test/test_efd.c               | 2 +-
 test/test/test_interrupts.c        | 4 ++--
 test/test/test_mbuf.c              | 2 +-
 test/test/test_table.c             | 2 +-
 test/test/test_table_acl.c         | 2 +-
 test/test/test_table_pipeline.c    | 2 +-
 test/test/virtual_pmd.c            | 4 ++--
 8 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/test/test-pipeline/pipeline_hash.c 
b/test/test-pipeline/pipeline_hash.c
index 0c6e04f78..991e381e2 100644
--- a/test/test-pipeline/pipeline_hash.c
+++ b/test/test-pipeline/pipeline_hash.c
@@ -480,7 +480,7 @@ uint64_t test_hash(
        __attribute__((unused)) uint32_t key_size,
        __attribute__((unused)) uint64_t seed)
 {
-       uint32_t *k32 = (uint32_t *) key;
+       uint32_t *k32 = key;
        uint32_t ip_dst = rte_be_to_cpu_32(k32[0]);
        uint64_t signature = (ip_dst >> 2) | ((ip_dst & 0x3) << 30);
 
diff --git a/test/test/test_efd.c b/test/test/test_efd.c
index de49e1d7e..544306166 100644
--- a/test/test/test_efd.c
+++ b/test/test/test_efd.c
@@ -306,7 +306,7 @@ static int test_five_keys(void)
                key_array[i] = &keys[i];
 
        rte_efd_lookup_bulk(handle, test_socket_id, 5,
-                       (const void **) (void *) &key_array, result);
+                       (void *) &key_array, result);
 
        for (i = 0; i < 5; i++) {
                TEST_ASSERT_EQUAL(result[i], data[i],
diff --git a/test/test/test_interrupts.c b/test/test/test_interrupts.c
index 5377292b5..e0229e5ee 100644
--- a/test/test/test_interrupts.c
+++ b/test/test/test_interrupts.c
@@ -201,7 +201,7 @@ test_interrupt_handle_compare(struct rte_intr_handle 
*intr_handle_l,
 static void
 test_interrupt_callback(void *arg)
 {
-       struct rte_intr_handle *intr_handle = (struct rte_intr_handle *)arg;
+       struct rte_intr_handle *intr_handle = arg;
        if (test_intr_type >= TEST_INTERRUPT_HANDLE_MAX) {
                printf("invalid interrupt type\n");
                flag = -1;
@@ -233,7 +233,7 @@ test_interrupt_callback(void *arg)
 static void
 test_interrupt_callback_1(void *arg)
 {
-       struct rte_intr_handle *intr_handle = (struct rte_intr_handle *)arg;
+       struct rte_intr_handle *intr_handle = arg;
        if (test_interrupt_handle_sanity_check(intr_handle) < 0) {
                printf("null or invalid intr_handle for %s\n", __func__);
                flag = -1;
diff --git a/test/test/test_mbuf.c b/test/test/test_mbuf.c
index a2e9bc6cf..d3ea812e5 100644
--- a/test/test/test_mbuf.c
+++ b/test/test/test_mbuf.c
@@ -692,7 +692,7 @@ test_refcnt_slave(__attribute__((unused)) void *arg)
        while (refcnt_stop_slaves == 0) {
                if (rte_ring_dequeue(refcnt_mbuf_ring, &mp) == 0) {
                        free++;
-                       rte_pktmbuf_free((struct rte_mbuf *)mp);
+                       rte_pktmbuf_free(mp);
                }
        }
 
diff --git a/test/test/test_table.c b/test/test/test_table.c
index 1faa0a6d8..9e9eed886 100644
--- a/test/test/test_table.c
+++ b/test/test/test_table.c
@@ -75,7 +75,7 @@ uint64_t pipeline_test_hash(void *key,
                __attribute__((unused)) uint32_t key_size,
                __attribute__((unused)) uint64_t seed)
 {
-       uint32_t *k32 = (uint32_t *) key;
+       uint32_t *k32 = key;
        uint32_t ip_dst = rte_be_to_cpu_32(k32[0]);
        uint64_t signature = ip_dst;
 
diff --git a/test/test/test_table_acl.c b/test/test/test_table_acl.c
index 4d43be7bc..08c100ffa 100644
--- a/test/test/test_table_acl.c
+++ b/test/test/test_table_acl.c
@@ -720,7 +720,7 @@ test_pipeline_single_filter(int expected_count)
                } else {
                        printf("Got %d object(s) from ring %d!\n", ret, i);
                        for (j = 0; j < ret; j++) {
-                               mbuf = (struct rte_mbuf *)objs[j];
+                               mbuf = objs[j];
                                rte_hexdump(stdout, "mbuf",
                                        rte_pktmbuf_mtod(mbuf, char *), 64);
                                rte_pktmbuf_free(mbuf);
diff --git a/test/test/test_table_pipeline.c b/test/test/test_table_pipeline.c
index b58aa5d12..a6fef721d 100644
--- a/test/test/test_table_pipeline.c
+++ b/test/test/test_table_pipeline.c
@@ -501,7 +501,7 @@ test_pipeline_single_filter(int test_type, int 
expected_count)
                else {
                        printf("Got %d object(s) from ring %d!\n", ret, i);
                        for (j = 0; j < ret; j++) {
-                               mbuf = (struct rte_mbuf *)objs[j];
+                               mbuf = objs[j];
                                rte_hexdump(stdout, "Object:",
                                        rte_pktmbuf_mtod(mbuf, char *),
                                        mbuf->data_len);
diff --git a/test/test/virtual_pmd.c b/test/test/virtual_pmd.c
index b209355af..b8802cd6a 100644
--- a/test/test/virtual_pmd.c
+++ b/test/test/virtual_pmd.c
@@ -366,7 +366,7 @@ static uint16_t
 virtual_ethdev_tx_burst_success(void *queue, struct rte_mbuf **bufs,
                uint16_t nb_pkts)
 {
-       struct virtual_ethdev_queue *tx_q = (struct virtual_ethdev_queue 
*)queue;
+       struct virtual_ethdev_queue *tx_q = queue;
 
        struct rte_eth_dev *vrtl_eth_dev;
        struct virtual_ethdev_private *dev_private;
@@ -402,7 +402,7 @@ virtual_ethdev_tx_burst_fail(void *queue, struct rte_mbuf 
**bufs,
 
        int i;
 
-       tx_q = (struct virtual_ethdev_queue *)queue;
+       tx_q = queue;
        vrtl_eth_dev = &rte_eth_devices[tx_q->port_id];
        dev_private = vrtl_eth_dev->data->dev_private;
 
-- 
2.11.0

Reply via email to