summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Makarov <aleksey.makarov@caviumnetworks.com>2015-06-02 11:00:25 -0700
committerDavid S. Miller <davem@davemloft.net>2015-06-02 12:49:32 -0700
commit39a0dd0b5e21ce93212a1dd026abb227c92e7651 (patch)
treea01c8a4f8d576101b13b30ab9a4c4b58a8b17b70
parent89987844681757f68dd16b96c4d1d0cc1039183c (diff)
net: thunderx: remove unneeded type conversions
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>
-rw-r--r--drivers/net/ethernet/cavium/thunder/nicvf_queues.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
index 7f0e108445cc..8929029613ca 100644
--- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
+++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c
@@ -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;
}