提交 b06b66c0 编写于 作者: J Jon Mason 提交者: David S. Miller

ksz884x: remove unnecessary setting of skb->dev

skb->dev is being unnecessarily set during ring init.  It is already being set
to the proper value when eth_type_trans is called on packet receive, and the
skb->dev is not referenced anywhere else in the code.
Signed-off-by: NJon Mason <jdmason@kudzu.us>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4a4511a0
......@@ -4480,14 +4480,12 @@ static void ksz_init_rx_buffers(struct dev_info *adapter)
dma_buf->len = adapter->mtu;
if (!dma_buf->skb)
dma_buf->skb = alloc_skb(dma_buf->len, GFP_ATOMIC);
if (dma_buf->skb && !dma_buf->dma) {
dma_buf->skb->dev = adapter->dev;
if (dma_buf->skb && !dma_buf->dma)
dma_buf->dma = pci_map_single(
adapter->pdev,
skb_tail_pointer(dma_buf->skb),
dma_buf->len,
PCI_DMA_FROMDEVICE);
}
/* Set descriptor. */
set_rx_buf(desc, dma_buf->dma);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册