stmmac: replace open coded __netdev_alloc_skb_ip_align() with actual call
authorVineet Gupta <Vineet.Gupta1@synopsys.com>
Wed, 20 May 2015 06:34:40 +0000 (12:04 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 21 May 2015 22:40:55 +0000 (18:40 -0400)
This also matches with the sibling call netdev_alloc_skb_ip_align() made in
rx fast path.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index 05c146f718a36551c4fe4ada4871f2612f16571d..42e1492ea845fd4f6c50c05ee43337756f44a116 100644 (file)
@@ -975,13 +975,11 @@ static int stmmac_init_rx_buffers(struct stmmac_priv *priv, struct dma_desc *p,
 {
        struct sk_buff *skb;
 
-       skb = __netdev_alloc_skb(priv->dev, priv->dma_buf_sz + NET_IP_ALIGN,
-                                flags);
+       skb = __netdev_alloc_skb_ip_align(priv->dev, priv->dma_buf_sz, flags);
        if (!skb) {
                pr_err("%s: Rx init fails; skb is NULL\n", __func__);
                return -ENOMEM;
        }
-       skb_reserve(skb, NET_IP_ALIGN);
        priv->rx_skbuff[i] = skb;
        priv->rx_skbuff_dma[i] = dma_map_single(priv->device, skb->data,
                                                priv->dma_buf_sz,