Skip to content

Commit

Permalink
net: thunderx: remove unneeded type conversions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Aleksey Makarov authored and David S. Miller committed Jun 2, 2015
1 parent 8998784 commit 39a0dd0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/cavium/thunder/nicvf_queues.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 39a0dd0

Please sign in to comment.