net: thunderx: remove unneeded type conversions
authorAleksey Makarov <aleksey.makarov@caviumnetworks.com>
Tue, 2 Jun 2015 18:00:25 +0000 (11:00 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 2 Jun 2015 19:49:32 +0000 (12:49 -0700)
No need to cast void* to u8*: pointer arithmetics
works same way for both.

Signed-off-by: Aleksey Makarov <aleksey.makarov@caviumnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/thunder/nicvf_queues.c

index 7f0e108445cc395c8fc57ff8186365dad24b7b9a..8929029613ca141dec12e560987d5d16a5acd54d 100644 (file)
@@ -62,8 +62,7 @@ static int nicvf_alloc_q_desc_mem(struct nicvf *nic, struct q_desc_mem *dmem,
 
        /* Align memory address for 'align_bytes' */
        dmem->phys_base = NICVF_ALIGNED_ADDR((u64)dmem->dma, align_bytes);
-       dmem->base = (void *)((u8 *)dmem->unalign_base +
-                             (dmem->phys_base - dmem->dma));
+       dmem->base = dmem->unalign_base + (dmem->phys_base - dmem->dma);
        return 0;
 }