[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080417065024.GA30293@electric-eye.fr.zoreil.com>
Date: Thu, 17 Apr 2008 08:50:24 +0200
From: Francois Romieu <romieu@...zoreil.com>
To: Stephen Hemminger <shemminger@...tta.com>
Cc: Jeff Garzik <jgarzik@...ox.com>, netdev@...r.kernel.org
Subject: Re: [PATCH 06/13] sis190: use netdev_alloc_skb
Stephen Hemminger <shemminger@...tta.com> :
> Use netdev_alloc_skb. This sets skb->dev and allows arch specific
> allocation.
>
> Compile tested only.
[...]
> -static int sis190_alloc_rx_skb(struct pci_dev *pdev, struct sk_buff **sk_buff,
> - struct RxDesc *desc, u32 rx_buf_sz)
> +static struct sk_buff *sis190_alloc_rx_skb(struct pci_dev *pdev,
> + struct net_device *dev,
> + struct RxDesc *desc, u32 rx_buf_sz)
> {
> struct sk_buff *skb;
> dma_addr_t mapping;
> int ret = 0;
'ret' is now an unused variable.
>
> - skb = dev_alloc_skb(rx_buf_sz);
> + skb = netdev_alloc_skb(dev, rx_buf_sz);
> if (!skb)
> goto err_out;
>
> - *sk_buff = skb;
> -
> mapping = pci_map_single(pdev, skb->data, rx_buf_sz,
> PCI_DMA_FROMDEVICE);
>
> sis190_map_to_asic(desc, mapping, rx_buf_sz);
> -out:
> - return ret;
> + return skb;
>
> err_out:
> ret = -ENOMEM;
> sis190_make_unusable_by_asic(desc);
> - goto out;
> + return NULL;
> }
--
Ueimor
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists