Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c056b734 authored by Pradeep A Dalvi's avatar Pradeep A Dalvi Committed by David S. Miller
Browse files

netdev: ethernet dev_alloc_skb to netdev_alloc_skb



Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet
  - Removed extra skb->dev = dev after netdev_alloc_skb

Signed-off-by: default avatarPradeep A Dalvi <netdev@pradeepdalvi.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 21a4e469
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1164,7 +1164,7 @@ static void eth16i_rx(struct net_device *dev)
		else {   /* Ok so now we should have a good packet */
			struct sk_buff *skb;

			skb = dev_alloc_skb(pkt_len + 3);
			skb = netdev_alloc_skb(dev, pkt_len + 3);
			if( skb == NULL ) {
				printk(KERN_WARNING "%s: Could'n allocate memory for packet (len %d)\n",
				       dev->name, pkt_len);
+1 −1
Original line number Diff line number Diff line
@@ -1002,7 +1002,7 @@ static void fjn_rx(struct net_device *dev)
		dev->stats.rx_errors++;
		break;
	    }
	    skb = dev_alloc_skb(pkt_len+2);
	    skb = netdev_alloc_skb(dev, pkt_len + 2);
	    if (skb == NULL) {
		netdev_notice(dev, "Memory squeeze, dropping packet (len %d)\n",
			      pkt_len);
+2 −3
Original line number Diff line number Diff line
@@ -1274,7 +1274,7 @@ static int hp100_build_rx_pdl(hp100_ring_t * ringptr,
	/* Note: This depends on the alloc_skb functions allocating more
	 * space than requested, i.e. aligning to 16bytes */

	ringptr->skb = dev_alloc_skb(roundup(MAX_ETHER_SIZE + 2, 4));
	ringptr->skb = netdev_alloc_skb(dev, roundup(MAX_ETHER_SIZE + 2, 4));

	if (NULL != ringptr->skb) {
		/*
@@ -1284,7 +1284,6 @@ static int hp100_build_rx_pdl(hp100_ring_t * ringptr,
		 */
		skb_reserve(ringptr->skb, 2);

		ringptr->skb->dev = dev;
		ringptr->skb->data = (u_char *) skb_put(ringptr->skb, MAX_ETHER_SIZE);

		/* ringptr->pdl points to the beginning of the PDL, i.e. the PDH */
@@ -1817,7 +1816,7 @@ static void hp100_rx(struct net_device *dev)
#endif

		/* Now we allocate the skb and transfer the data into it. */
		skb = dev_alloc_skb(pkt_len+2);
		skb = netdev_alloc_skb(dev, pkt_len + 2);
		if (skb == NULL) {	/* Not enough memory->drop packet */
#ifdef HP100_DEBUG
			printk("hp100: %s: rx: couldn't allocate a sk_buff of size %d\n",
+1 −1
Original line number Diff line number Diff line
@@ -583,7 +583,7 @@ static void receive_packet(struct net_device *dev, int len)
	unsigned long flags;

	rlen = (len + 1) & ~1;
	skb = dev_alloc_skb(rlen + 2);
	skb = netdev_alloc_skb(dev, rlen + 2);

	if (!skb) {
		pr_warning("%s: memory squeeze, dropping packet\n", dev->name);
+1 −1
Original line number Diff line number Diff line
@@ -851,7 +851,7 @@ static void el16_rx(struct net_device *dev)
			struct sk_buff *skb;

			pkt_len &= 0x3fff;
			skb = dev_alloc_skb(pkt_len+2);
			skb = netdev_alloc_skb(dev, pkt_len + 2);
			if (skb == NULL) {
				pr_err("%s: Memory squeeze, dropping packet.\n",
				       dev->name);
Loading