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

Commit b05b7d95 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

net: remove redundant code



eth_type_trans(skb, netdev) does the "skb->dev = netdev;"
initialization, we can remove it from various network drivers.

Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e446630c
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -743,7 +743,6 @@ static void netdev_rx(struct net_device *dev)
				return;
			}

			skb->dev = dev;
			skb_reserve(skb, 2);
			skb_put(skb, length);
			skb_copy_to_linear_data(skb, data, length);
+0 −1
Original line number Diff line number Diff line
@@ -1817,7 +1817,6 @@ static void atl1c_clean_rx_irq(struct atl1c_adapter *adapter, u8 que,
		atl1c_clean_rfd(rfd_ring, rrs, rfd_num);
		skb_put(skb, length - ETH_FCS_LEN);
		skb->protocol = eth_type_trans(skb, netdev);
		skb->dev = netdev;
		atl1c_rx_checksum(adapter, skb, rrs);
		if (unlikely(adapter->vlgrp) && rrs->word3 & RRS_VLAN_INS) {
			u16 vlan;
+0 −1
Original line number Diff line number Diff line
@@ -1428,7 +1428,6 @@ static void atl1e_clean_rx_irq(struct atl1e_adapter *adapter, u8 que,
					    "Memory squeeze, deferring packet\n");
				goto skip_pkt;
			}
			skb->dev = netdev;
			memcpy(skb->data, (u8 *)(prrs + 1), packet_size);
			skb_put(skb, packet_size);
			skb->protocol = eth_type_trans(skb, netdev);
+0 −1
Original line number Diff line number Diff line
@@ -421,7 +421,6 @@ static void atl2_intr_rx(struct atl2_adapter *adapter)
				netdev->stats.rx_dropped++;
				break;
			}
			skb->dev = netdev;
			memcpy(skb->data, rxd->packet, rx_size);
			skb_put(skb, rx_size);
			skb->protocol = eth_type_trans(skb, netdev);
+0 −1
Original line number Diff line number Diff line
@@ -340,7 +340,6 @@ static int bcm_enet_receive_queue(struct net_device *dev, int budget)
		}

		skb_put(skb, len);
		skb->dev = dev;
		skb->protocol = eth_type_trans(skb, dev);
		priv->stats.rx_packets++;
		priv->stats.rx_bytes += len;
Loading