aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authortcharding <me@tobin.cc>2017-02-09 01:56:04 -0500
committerDavid S. Miller <davem@davemloft.net>2017-02-10 13:37:48 -0500
commit722c9a0cebb88ac1a982285f15d5fd44f4140c66 (patch)
tree06072a23ea03249a43ce7368c0cf9fa7c2311345 /net/core/dev.c
parentb668b9030c0168cf86e054adfe72e89df49b2772 (diff)
net: Fix checkpatch WARNING: please, no space before tabs
This patch fixes multiple occurrences of space before tabs warnings. More lines of code were moved than required to keep kernel-doc comments uniform. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c142
1 files changed, 71 insertions, 71 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 0921609dfa81..b7c795017299 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * NET3 Protocol independent device support routines. 2 * NET3 Protocol independent device support routines.
3 * 3 *
4 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License 5 * modify it under the terms of the GNU General Public License
@@ -7,7 +7,7 @@
7 * 2 of the License, or (at your option) any later version. 7 * 2 of the License, or (at your option) any later version.
8 * 8 *
9 * Derived from the non IP parts of dev.c 1.0.19 9 * Derived from the non IP parts of dev.c 1.0.19
10 * Authors: Ross Biro 10 * Authors: Ross Biro
11 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> 11 * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
12 * Mark Evans, <evansmp@uhura.aston.ac.uk> 12 * Mark Evans, <evansmp@uhura.aston.ac.uk>
13 * 13 *
@@ -21,9 +21,9 @@
21 * 21 *
22 * Changes: 22 * Changes:
23 * D.J. Barrow : Fixed bug where dev->refcnt gets set 23 * D.J. Barrow : Fixed bug where dev->refcnt gets set
24 * to 2 if register_netdev gets called 24 * to 2 if register_netdev gets called
25 * before net_dev_init & also removed a 25 * before net_dev_init & also removed a
26 * few lines of code in the process. 26 * few lines of code in the process.
27 * Alan Cox : device private ioctl copies fields back. 27 * Alan Cox : device private ioctl copies fields back.
28 * Alan Cox : Transmit queue code does relevant 28 * Alan Cox : Transmit queue code does relevant
29 * stunts to keep the queue safe. 29 * stunts to keep the queue safe.
@@ -36,7 +36,7 @@
36 * Alan Cox : 100 backlog just doesn't cut it when 36 * Alan Cox : 100 backlog just doesn't cut it when
37 * you start doing multicast video 8) 37 * you start doing multicast video 8)
38 * Alan Cox : Rewrote net_bh and list manager. 38 * Alan Cox : Rewrote net_bh and list manager.
39 * Alan Cox : Fix ETH_P_ALL echoback lengths. 39 * Alan Cox : Fix ETH_P_ALL echoback lengths.
40 * Alan Cox : Took out transmit every packet pass 40 * Alan Cox : Took out transmit every packet pass
41 * Saved a few bytes in the ioctl handler 41 * Saved a few bytes in the ioctl handler
42 * Alan Cox : Network driver sets packet type before 42 * Alan Cox : Network driver sets packet type before
@@ -46,7 +46,7 @@
46 * Richard Kooijman: Timestamp fixes. 46 * Richard Kooijman: Timestamp fixes.
47 * Alan Cox : Wrong field in SIOCGIFDSTADDR 47 * Alan Cox : Wrong field in SIOCGIFDSTADDR
48 * Alan Cox : Device lock protection. 48 * Alan Cox : Device lock protection.
49 * Alan Cox : Fixed nasty side effect of device close 49 * Alan Cox : Fixed nasty side effect of device close
50 * changes. 50 * changes.
51 * Rudi Cilibrasi : Pass the right thing to 51 * Rudi Cilibrasi : Pass the right thing to
52 * set_mac_address() 52 * set_mac_address()
@@ -67,8 +67,8 @@
67 * Paul Rusty Russell : SIOCSIFNAME 67 * Paul Rusty Russell : SIOCSIFNAME
68 * Pekka Riikonen : Netdev boot-time settings code 68 * Pekka Riikonen : Netdev boot-time settings code
69 * Andrew Morton : Make unregister_netdevice wait 69 * Andrew Morton : Make unregister_netdevice wait
70 * indefinitely on dev->refcnt 70 * indefinitely on dev->refcnt
71 * J Hadi Salim : - Backlog queue sampling 71 * J Hadi Salim : - Backlog queue sampling
72 * - netif_rx() feedback 72 * - netif_rx() feedback
73 */ 73 */
74 74
@@ -574,13 +574,13 @@ static int netdev_boot_setup_add(char *name, struct ifmap *map)
574} 574}
575 575
576/** 576/**
577 * netdev_boot_setup_check - check boot time settings 577 * netdev_boot_setup_check - check boot time settings
578 * @dev: the netdevice 578 * @dev: the netdevice
579 * 579 *
580 * Check boot time settings for the device. 580 * Check boot time settings for the device.
581 * The found settings are set for the device to be used 581 * The found settings are set for the device to be used
582 * later in the device probing. 582 * later in the device probing.
583 * Returns 0 if no settings found, 1 if they are. 583 * Returns 0 if no settings found, 1 if they are.
584 */ 584 */
585int netdev_boot_setup_check(struct net_device *dev) 585int netdev_boot_setup_check(struct net_device *dev)
586{ 586{
@@ -590,10 +590,10 @@ int netdev_boot_setup_check(struct net_device *dev)
590 for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++) { 590 for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++) {
591 if (s[i].name[0] != '\0' && s[i].name[0] != ' ' && 591 if (s[i].name[0] != '\0' && s[i].name[0] != ' ' &&
592 !strcmp(dev->name, s[i].name)) { 592 !strcmp(dev->name, s[i].name)) {
593 dev->irq = s[i].map.irq; 593 dev->irq = s[i].map.irq;
594 dev->base_addr = s[i].map.base_addr; 594 dev->base_addr = s[i].map.base_addr;
595 dev->mem_start = s[i].map.mem_start; 595 dev->mem_start = s[i].map.mem_start;
596 dev->mem_end = s[i].map.mem_end; 596 dev->mem_end = s[i].map.mem_end;
597 return 1; 597 return 1;
598 } 598 }
599 } 599 }
@@ -603,14 +603,14 @@ EXPORT_SYMBOL(netdev_boot_setup_check);
603 603
604 604
605/** 605/**
606 * netdev_boot_base - get address from boot time settings 606 * netdev_boot_base - get address from boot time settings
607 * @prefix: prefix for network device 607 * @prefix: prefix for network device
608 * @unit: id for network device 608 * @unit: id for network device
609 * 609 *
610 * Check boot time settings for the base address of device. 610 * Check boot time settings for the base address of device.
611 * The found settings are set for the device to be used 611 * The found settings are set for the device to be used
612 * later in the device probing. 612 * later in the device probing.
613 * Returns 0 if no settings found. 613 * Returns 0 if no settings found.
614 */ 614 */
615unsigned long netdev_boot_base(const char *prefix, int unit) 615unsigned long netdev_boot_base(const char *prefix, int unit)
616{ 616{
@@ -737,15 +737,15 @@ struct net_device *__dev_get_by_name(struct net *net, const char *name)
737EXPORT_SYMBOL(__dev_get_by_name); 737EXPORT_SYMBOL(__dev_get_by_name);
738 738
739/** 739/**
740 * dev_get_by_name_rcu - find a device by its name 740 * dev_get_by_name_rcu - find a device by its name
741 * @net: the applicable net namespace 741 * @net: the applicable net namespace
742 * @name: name to find 742 * @name: name to find
743 * 743 *
744 * Find an interface by name. 744 * Find an interface by name.
745 * If the name is found a pointer to the device is returned. 745 * If the name is found a pointer to the device is returned.
746 * If the name is not found then %NULL is returned. 746 * If the name is not found then %NULL is returned.
747 * The reference counters are not incremented so the caller must be 747 * The reference counters are not incremented so the caller must be
748 * careful with locks. The caller must hold RCU lock. 748 * careful with locks. The caller must hold RCU lock.
749 */ 749 */
750 750
751struct net_device *dev_get_by_name_rcu(struct net *net, const char *name) 751struct net_device *dev_get_by_name_rcu(struct net *net, const char *name)
@@ -1289,8 +1289,8 @@ void netdev_state_change(struct net_device *dev)
1289EXPORT_SYMBOL(netdev_state_change); 1289EXPORT_SYMBOL(netdev_state_change);
1290 1290
1291/** 1291/**
1292 * netdev_notify_peers - notify network peers about existence of @dev 1292 * netdev_notify_peers - notify network peers about existence of @dev
1293 * @dev: network device 1293 * @dev: network device
1294 * 1294 *
1295 * Generate traffic such that interested network peers are aware of 1295 * Generate traffic such that interested network peers are aware of
1296 * @dev, such as by generating a gratuitous ARP. This may be used when 1296 * @dev, such as by generating a gratuitous ARP. This may be used when
@@ -1518,17 +1518,17 @@ static int call_netdevice_notifier(struct notifier_block *nb, unsigned long val,
1518static int dev_boot_phase = 1; 1518static int dev_boot_phase = 1;
1519 1519
1520/** 1520/**
1521 * register_netdevice_notifier - register a network notifier block 1521 * register_netdevice_notifier - register a network notifier block
1522 * @nb: notifier 1522 * @nb: notifier
1523 * 1523 *
1524 * Register a notifier to be called when network device events occur. 1524 * Register a notifier to be called when network device events occur.
1525 * The notifier passed is linked into the kernel structures and must 1525 * The notifier passed is linked into the kernel structures and must
1526 * not be reused until it has been unregistered. A negative errno code 1526 * not be reused until it has been unregistered. A negative errno code
1527 * is returned on a failure. 1527 * is returned on a failure.
1528 * 1528 *
1529 * When registered all registration and up events are replayed 1529 * When registered all registration and up events are replayed
1530 * to the new notifier to allow device to have a race free 1530 * to the new notifier to allow device to have a race free
1531 * view of the network device list. 1531 * view of the network device list.
1532 */ 1532 */
1533 1533
1534int register_netdevice_notifier(struct notifier_block *nb) 1534int register_netdevice_notifier(struct notifier_block *nb)
@@ -1585,17 +1585,17 @@ outroll:
1585EXPORT_SYMBOL(register_netdevice_notifier); 1585EXPORT_SYMBOL(register_netdevice_notifier);
1586 1586
1587/** 1587/**
1588 * unregister_netdevice_notifier - unregister a network notifier block 1588 * unregister_netdevice_notifier - unregister a network notifier block
1589 * @nb: notifier 1589 * @nb: notifier
1590 * 1590 *
1591 * Unregister a notifier previously registered by 1591 * Unregister a notifier previously registered by
1592 * register_netdevice_notifier(). The notifier is unlinked into the 1592 * register_netdevice_notifier(). The notifier is unlinked into the
1593 * kernel structures and may then be reused. A negative errno code 1593 * kernel structures and may then be reused. A negative errno code
1594 * is returned on a failure. 1594 * is returned on a failure.
1595 * 1595 *
1596 * After unregistering unregister and down device events are synthesized 1596 * After unregistering unregister and down device events are synthesized
1597 * for all devices on the device list to the removed notifier to remove 1597 * for all devices on the device list to the removed notifier to remove
1598 * the need for special case cleanup code. 1598 * the need for special case cleanup code.
1599 */ 1599 */
1600 1600
1601int unregister_netdevice_notifier(struct notifier_block *nb) 1601int unregister_netdevice_notifier(struct notifier_block *nb)
@@ -7544,17 +7544,17 @@ void netdev_freemem(struct net_device *dev)
7544} 7544}
7545 7545
7546/** 7546/**
7547 * alloc_netdev_mqs - allocate network device 7547 * alloc_netdev_mqs - allocate network device
7548 * @sizeof_priv: size of private data to allocate space for 7548 * @sizeof_priv: size of private data to allocate space for
7549 * @name: device name format string 7549 * @name: device name format string
7550 * @name_assign_type: origin of device name 7550 * @name_assign_type: origin of device name
7551 * @setup: callback to initialize device 7551 * @setup: callback to initialize device
7552 * @txqs: the number of TX subqueues to allocate 7552 * @txqs: the number of TX subqueues to allocate
7553 * @rxqs: the number of RX subqueues to allocate 7553 * @rxqs: the number of RX subqueues to allocate
7554 * 7554 *
7555 * Allocates a struct net_device with private data area for driver use 7555 * Allocates a struct net_device with private data area for driver use
7556 * and performs basic initialization. Also allocates subqueue structs 7556 * and performs basic initialization. Also allocates subqueue structs
7557 * for each queue on the device. 7557 * for each queue on the device.
7558 */ 7558 */
7559struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name, 7559struct net_device *alloc_netdev_mqs(int sizeof_priv, const char *name,
7560 unsigned char name_assign_type, 7560 unsigned char name_assign_type,
@@ -7666,13 +7666,13 @@ free_dev:
7666EXPORT_SYMBOL(alloc_netdev_mqs); 7666EXPORT_SYMBOL(alloc_netdev_mqs);
7667 7667
7668/** 7668/**
7669 * free_netdev - free network device 7669 * free_netdev - free network device
7670 * @dev: device 7670 * @dev: device
7671 * 7671 *
7672 * This function does the last stage of destroying an allocated device 7672 * This function does the last stage of destroying an allocated device
7673 * interface. The reference to the device object is released. 7673 * interface. The reference to the device object is released. If this
7674 * If this is the last reference then it will be freed. 7674 * is the last reference then it will be freed.Must be called in process
7675 * Must be called in process context. 7675 * context.
7676 */ 7676 */
7677void free_netdev(struct net_device *dev) 7677void free_netdev(struct net_device *dev)
7678{ 7678{