Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[NET]: Deinline netif_carrier_{on,off}().

# grep -r 'netif_carrier_o[nf]' linux-2.6.12 | wc -l
246

# size vmlinux.org vmlinux.carrier
text data bss dec hex filename
4339634 1054414 259296 5653344 564360 vmlinux.org
4337710 1054414 259296 5651420 563bdc vmlinux.carrier

And this ain't an allyesconfig kernel!

Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Denis Vlasenko and committed by
David S. Miller
0a242efc 5917ed96

+18 -12
+2 -12
include/linux/netdevice.h
··· 699 699 700 700 extern void __netdev_watchdog_up(struct net_device *dev); 701 701 702 - static inline void netif_carrier_on(struct net_device *dev) 703 - { 704 - if (test_and_clear_bit(__LINK_STATE_NOCARRIER, &dev->state)) 705 - linkwatch_fire_event(dev); 706 - if (netif_running(dev)) 707 - __netdev_watchdog_up(dev); 708 - } 702 + extern void netif_carrier_on(struct net_device *dev); 709 703 710 - static inline void netif_carrier_off(struct net_device *dev) 711 - { 712 - if (!test_and_set_bit(__LINK_STATE_NOCARRIER, &dev->state)) 713 - linkwatch_fire_event(dev); 714 - } 704 + extern void netif_carrier_off(struct net_device *dev); 715 705 716 706 /* Hot-plugging. */ 717 707 static inline int netif_device_present(struct net_device *dev)
+16
net/sched/sch_generic.c
··· 238 238 spin_unlock_bh(&dev->xmit_lock); 239 239 } 240 240 241 + void netif_carrier_on(struct net_device *dev) 242 + { 243 + if (test_and_clear_bit(__LINK_STATE_NOCARRIER, &dev->state)) 244 + linkwatch_fire_event(dev); 245 + if (netif_running(dev)) 246 + __netdev_watchdog_up(dev); 247 + } 248 + 249 + void netif_carrier_off(struct net_device *dev) 250 + { 251 + if (!test_and_set_bit(__LINK_STATE_NOCARRIER, &dev->state)) 252 + linkwatch_fire_event(dev); 253 + } 254 + 241 255 /* "NOOP" scheduler: the best scheduler, recommended for all interfaces 242 256 under all circumstances. It is difficult to invent anything faster or 243 257 cheaper. ··· 614 600 } 615 601 616 602 EXPORT_SYMBOL(__netdev_watchdog_up); 603 + EXPORT_SYMBOL(netif_carrier_on); 604 + EXPORT_SYMBOL(netif_carrier_off); 617 605 EXPORT_SYMBOL(noop_qdisc); 618 606 EXPORT_SYMBOL(noop_qdisc_ops); 619 607 EXPORT_SYMBOL(qdisc_create_dflt);