提交 39a0dd0b 编写于 作者: A Aleksey Makarov 提交者: David S. Miller

net: thunderx: remove unneeded type conversions

No need to cast void* to u8*: pointer arithmetics
works same way for both.
Signed-off-by: NAleksey Makarov <aleksey.makarov@caviumnetworks.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 89987844
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册