Remove unnecessary casts of void * pointers to a specific type.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
__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);
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],
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;
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;
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);
}
}
__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;
} 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);
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);
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;
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;