[NET] CORE: Fix whitespace errors.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
9d6f229fc4
commit
4ec93edb14
@@ -860,7 +860,7 @@ int dev_open(struct net_device *dev)
|
||||
clear_bit(__LINK_STATE_START, &dev->state);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* If it went open OK then:
|
||||
*/
|
||||
|
||||
@@ -1157,7 +1157,7 @@ void netif_device_attach(struct net_device *dev)
|
||||
if (!test_and_set_bit(__LINK_STATE_PRESENT, &dev->state) &&
|
||||
netif_running(dev)) {
|
||||
netif_wake_queue(dev);
|
||||
__netdev_watchdog_up(dev);
|
||||
__netdev_watchdog_up(dev);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(netif_device_attach);
|
||||
@@ -1449,8 +1449,8 @@ int dev_queue_xmit(struct sk_buff *skb)
|
||||
(!(dev->features & NETIF_F_GEN_CSUM) &&
|
||||
(!(dev->features & NETIF_F_IP_CSUM) ||
|
||||
skb->protocol != htons(ETH_P_IP))))
|
||||
if (skb_checksum_help(skb))
|
||||
goto out_kfree_skb;
|
||||
if (skb_checksum_help(skb))
|
||||
goto out_kfree_skb;
|
||||
|
||||
gso:
|
||||
spin_lock_prefetch(&dev->queue_lock);
|
||||
@@ -2061,7 +2061,7 @@ static int dev_ifconf(char __user *arg)
|
||||
total += done;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* All done. Write the updated control block back to the caller.
|
||||
@@ -2154,7 +2154,7 @@ static struct netif_rx_stats *softnet_get_online(loff_t *pos)
|
||||
struct netif_rx_stats *rc = NULL;
|
||||
|
||||
while (*pos < NR_CPUS)
|
||||
if (cpu_online(*pos)) {
|
||||
if (cpu_online(*pos)) {
|
||||
rc = &per_cpu(netdev_rx_stat, *pos);
|
||||
break;
|
||||
} else
|
||||
@@ -2319,7 +2319,7 @@ void dev_set_promiscuity(struct net_device *dev, int inc)
|
||||
dev_mc_upload(dev);
|
||||
printk(KERN_INFO "device %s %s promiscuous mode\n",
|
||||
dev->name, (dev->flags & IFF_PROMISC) ? "entered" :
|
||||
"left");
|
||||
"left");
|
||||
audit_log(current->audit_context, GFP_ATOMIC,
|
||||
AUDIT_ANOM_PROMISCUOUS,
|
||||
"dev=%s prom=%d old_prom=%d auid=%u",
|
||||
@@ -2816,7 +2816,7 @@ int dev_ioctl(unsigned int cmd, void __user *arg)
|
||||
rtnl_unlock();
|
||||
if (IW_IS_GET(cmd) &&
|
||||
copy_to_user(arg, &ifr,
|
||||
sizeof(struct ifreq)))
|
||||
sizeof(struct ifreq)))
|
||||
ret = -EFAULT;
|
||||
return ret;
|
||||
}
|
||||
@@ -2923,9 +2923,9 @@ int register_netdevice(struct net_device *dev)
|
||||
= hlist_entry(p, struct net_device, name_hlist);
|
||||
if (!strncmp(d->name, dev->name, IFNAMSIZ)) {
|
||||
ret = -EEXIST;
|
||||
goto out;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Fix illegal SG+CSUM combinations. */
|
||||
if ((dev->features & NETIF_F_SG) &&
|
||||
|
@@ -53,7 +53,7 @@ static void *__load_pointer(struct sk_buff *skb, int k)
|
||||
}
|
||||
|
||||
static inline void *load_pointer(struct sk_buff *skb, int k,
|
||||
unsigned int size, void *buffer)
|
||||
unsigned int size, void *buffer)
|
||||
{
|
||||
if (k >= 0)
|
||||
return skb_header_pointer(skb, k, size, buffer);
|
||||
|
@@ -209,7 +209,7 @@ int csum_partial_copy_fromiovecend(unsigned char *kdata, struct iovec *iov,
|
||||
if (partial_cnt) {
|
||||
copy -= partial_cnt;
|
||||
if (copy_from_user(kdata + copy, base + copy,
|
||||
partial_cnt))
|
||||
partial_cnt))
|
||||
goto out_fault;
|
||||
}
|
||||
}
|
||||
@@ -224,7 +224,7 @@ int csum_partial_copy_fromiovecend(unsigned char *kdata, struct iovec *iov,
|
||||
kdata += copy + partial_cnt;
|
||||
iov++;
|
||||
}
|
||||
*csump = csum;
|
||||
*csump = csum;
|
||||
out:
|
||||
return err;
|
||||
|
||||
|
@@ -687,9 +687,9 @@ next_elt:
|
||||
np = &n->next;
|
||||
}
|
||||
|
||||
/* Cycle through all hash buckets every base_reachable_time/2 ticks.
|
||||
* ARP entry timeouts range from 1/2 base_reachable_time to 3/2
|
||||
* base_reachable_time.
|
||||
/* Cycle through all hash buckets every base_reachable_time/2 ticks.
|
||||
* ARP entry timeouts range from 1/2 base_reachable_time to 3/2
|
||||
* base_reachable_time.
|
||||
*/
|
||||
expire = tbl->parms.base_reachable_time >> 1;
|
||||
expire /= (tbl->hash_mask + 1);
|
||||
@@ -1129,7 +1129,7 @@ int neigh_compat_output(struct sk_buff *skb)
|
||||
|
||||
if (dev->hard_header &&
|
||||
dev->hard_header(skb, dev, ntohs(skb->protocol), NULL, NULL,
|
||||
skb->len) < 0 &&
|
||||
skb->len) < 0 &&
|
||||
dev->rebuild_header(skb))
|
||||
return 0;
|
||||
|
||||
@@ -2663,7 +2663,7 @@ int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
|
||||
t->neigh_vars[14].procname = NULL;
|
||||
t->neigh_vars[15].procname = NULL;
|
||||
} else {
|
||||
dev_name_source = t->neigh_dev[0].procname;
|
||||
dev_name_source = t->neigh_dev[0].procname;
|
||||
t->neigh_vars[12].data = (int *)(p + 1);
|
||||
t->neigh_vars[13].data = (int *)(p + 1) + 1;
|
||||
t->neigh_vars[14].data = (int *)(p + 1) + 2;
|
||||
@@ -2698,7 +2698,7 @@ int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p,
|
||||
goto free;
|
||||
}
|
||||
|
||||
t->neigh_dev[0].procname = dev_name;
|
||||
t->neigh_dev[0].procname = dev_name;
|
||||
|
||||
t->neigh_neigh_dir[0].ctl_name = pdev_id;
|
||||
|
||||
|
@@ -237,13 +237,13 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
|
||||
{
|
||||
int status = NETDEV_TX_BUSY;
|
||||
unsigned long tries;
|
||||
struct net_device *dev = np->dev;
|
||||
struct netpoll_info *npinfo = np->dev->npinfo;
|
||||
struct net_device *dev = np->dev;
|
||||
struct netpoll_info *npinfo = np->dev->npinfo;
|
||||
|
||||
if (!npinfo || !netif_running(dev) || !netif_device_present(dev)) {
|
||||
__kfree_skb(skb);
|
||||
return;
|
||||
}
|
||||
if (!npinfo || !netif_running(dev) || !netif_device_present(dev)) {
|
||||
__kfree_skb(skb);
|
||||
return;
|
||||
}
|
||||
|
||||
/* don't get messages out of order, and no recursion */
|
||||
if (skb_queue_len(&npinfo->txq) == 0 &&
|
||||
@@ -676,7 +676,7 @@ int netpoll_setup(struct netpoll *np)
|
||||
}
|
||||
|
||||
atleast = jiffies + HZ/10;
|
||||
atmost = jiffies + 4*HZ;
|
||||
atmost = jiffies + 4*HZ;
|
||||
while (!netif_carrier_ok(ndev)) {
|
||||
if (time_after(jiffies, atmost)) {
|
||||
printk(KERN_NOTICE
|
||||
@@ -772,9 +772,9 @@ void netpoll_cleanup(struct netpoll *np)
|
||||
np->dev->npinfo = NULL;
|
||||
if (atomic_dec_and_test(&npinfo->refcnt)) {
|
||||
skb_queue_purge(&npinfo->arp_tx);
|
||||
skb_queue_purge(&npinfo->txq);
|
||||
skb_queue_purge(&npinfo->txq);
|
||||
cancel_rearming_delayed_work(&npinfo->tx_work);
|
||||
flush_scheduled_work();
|
||||
flush_scheduled_work();
|
||||
|
||||
kfree(npinfo);
|
||||
}
|
||||
|
@@ -874,7 +874,7 @@ void __init rtnetlink_init(void)
|
||||
panic("rtnetlink_init: cannot allocate rta_buf\n");
|
||||
|
||||
rtnl = netlink_kernel_create(NETLINK_ROUTE, RTNLGRP_MAX, rtnetlink_rcv,
|
||||
THIS_MODULE);
|
||||
THIS_MODULE);
|
||||
if (rtnl == NULL)
|
||||
panic("rtnetlink_init: cannot initialize rtnetlink\n");
|
||||
netlink_set_nonroot(NETLINK_ROUTE, NL_NONROOT_RECV);
|
||||
|
@@ -88,7 +88,7 @@ static struct kmem_cache *skbuff_fclone_cache __read_mostly;
|
||||
void skb_over_panic(struct sk_buff *skb, int sz, void *here)
|
||||
{
|
||||
printk(KERN_EMERG "skb_over_panic: text:%p len:%d put:%d head:%p "
|
||||
"data:%p tail:%p end:%p dev:%s\n",
|
||||
"data:%p tail:%p end:%p dev:%s\n",
|
||||
here, skb->len, sz, skb->head, skb->data, skb->tail, skb->end,
|
||||
skb->dev ? skb->dev->name : "<NULL>");
|
||||
BUG();
|
||||
@@ -106,7 +106,7 @@ void skb_over_panic(struct sk_buff *skb, int sz, void *here)
|
||||
void skb_under_panic(struct sk_buff *skb, int sz, void *here)
|
||||
{
|
||||
printk(KERN_EMERG "skb_under_panic: text:%p len:%d put:%d head:%p "
|
||||
"data:%p tail:%p end:%p dev:%s\n",
|
||||
"data:%p tail:%p end:%p dev:%s\n",
|
||||
here, skb->len, sz, skb->head, skb->data, skb->tail, skb->end,
|
||||
skb->dev ? skb->dev->name : "<NULL>");
|
||||
BUG();
|
||||
@@ -271,7 +271,7 @@ struct sk_buff *__netdev_alloc_skb(struct net_device *dev,
|
||||
int node = dev->dev.parent ? dev_to_node(dev->dev.parent) : -1;
|
||||
struct sk_buff *skb;
|
||||
|
||||
skb = __alloc_skb(length + NET_SKB_PAD, gfp_mask, 0, node);
|
||||
skb = __alloc_skb(length + NET_SKB_PAD, gfp_mask, 0, node);
|
||||
if (likely(skb)) {
|
||||
skb_reserve(skb, NET_SKB_PAD);
|
||||
skb->dev = dev;
|
||||
|
@@ -361,18 +361,18 @@ int sock_setsockopt(struct socket *sock, int level, int optname,
|
||||
}
|
||||
#endif
|
||||
|
||||
if(optlen<sizeof(int))
|
||||
return(-EINVAL);
|
||||
if(optlen<sizeof(int))
|
||||
return(-EINVAL);
|
||||
|
||||
if (get_user(val, (int __user *)optval))
|
||||
return -EFAULT;
|
||||
|
||||
valbool = val?1:0;
|
||||
valbool = val?1:0;
|
||||
|
||||
lock_sock(sk);
|
||||
|
||||
switch(optname)
|
||||
{
|
||||
switch(optname)
|
||||
{
|
||||
case SO_DEBUG:
|
||||
if(val && !capable(CAP_NET_ADMIN))
|
||||
{
|
||||
@@ -389,7 +389,7 @@ int sock_setsockopt(struct socket *sock, int level, int optname,
|
||||
case SO_TYPE:
|
||||
case SO_ERROR:
|
||||
ret = -ENOPROTOOPT;
|
||||
break;
|
||||
break;
|
||||
case SO_DONTROUTE:
|
||||
if (valbool)
|
||||
sock_set_flag(sk, SOCK_LOCALROUTE);
|
||||
@@ -474,11 +474,11 @@ set_rcvbuf:
|
||||
sock_valbool_flag(sk, SOCK_KEEPOPEN, valbool);
|
||||
break;
|
||||
|
||||
case SO_OOBINLINE:
|
||||
case SO_OOBINLINE:
|
||||
sock_valbool_flag(sk, SOCK_URGINLINE, valbool);
|
||||
break;
|
||||
|
||||
case SO_NO_CHECK:
|
||||
case SO_NO_CHECK:
|
||||
sk->sk_no_check = valbool;
|
||||
break;
|
||||
|
||||
@@ -608,7 +608,7 @@ set_rcvbuf:
|
||||
case SO_DETACH_FILTER:
|
||||
rcu_read_lock_bh();
|
||||
filter = rcu_dereference(sk->sk_filter);
|
||||
if (filter) {
|
||||
if (filter) {
|
||||
rcu_assign_pointer(sk->sk_filter, NULL);
|
||||
sk_filter_release(sk, filter);
|
||||
rcu_read_unlock_bh();
|
||||
@@ -628,9 +628,9 @@ set_rcvbuf:
|
||||
/* We implement the SO_SNDLOWAT etc to
|
||||
not be settable (1003.1g 5.3) */
|
||||
default:
|
||||
ret = -ENOPROTOOPT;
|
||||
ret = -ENOPROTOOPT;
|
||||
break;
|
||||
}
|
||||
}
|
||||
release_sock(sk);
|
||||
return ret;
|
||||
}
|
||||
@@ -643,21 +643,21 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
|
||||
|
||||
union
|
||||
{
|
||||
int val;
|
||||
struct linger ling;
|
||||
int val;
|
||||
struct linger ling;
|
||||
struct timeval tm;
|
||||
} v;
|
||||
|
||||
unsigned int lv = sizeof(int);
|
||||
int len;
|
||||
|
||||
if(get_user(len,optlen))
|
||||
return -EFAULT;
|
||||
if(get_user(len,optlen))
|
||||
return -EFAULT;
|
||||
if(len < 0)
|
||||
return -EINVAL;
|
||||
|
||||
switch(optname)
|
||||
{
|
||||
switch(optname)
|
||||
{
|
||||
case SO_DEBUG:
|
||||
v.val = sock_flag(sk, SOCK_DBG);
|
||||
break;
|
||||
@@ -711,7 +711,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
|
||||
case SO_LINGER:
|
||||
lv = sizeof(v.ling);
|
||||
v.ling.l_onoff = !!sock_flag(sk, SOCK_LINGER);
|
||||
v.ling.l_linger = sk->sk_lingertime / HZ;
|
||||
v.ling.l_linger = sk->sk_lingertime / HZ;
|
||||
break;
|
||||
|
||||
case SO_BSDCOMPAT:
|
||||
@@ -798,9 +798,9 @@ int sock_getsockopt(struct socket *sock, int level, int optname,
|
||||
if (copy_to_user(optval, &v, len))
|
||||
return -EFAULT;
|
||||
lenout:
|
||||
if (put_user(len, optlen))
|
||||
return -EFAULT;
|
||||
return 0;
|
||||
if (put_user(len, optlen))
|
||||
return -EFAULT;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1074,7 +1074,7 @@ void *sock_kmalloc(struct sock *sk, int size, gfp_t priority)
|
||||
atomic_read(&sk->sk_omem_alloc) + size < sysctl_optmem_max) {
|
||||
void *mem;
|
||||
/* First do the add, to avoid the race if kmalloc
|
||||
* might sleep.
|
||||
* might sleep.
|
||||
*/
|
||||
atomic_add(size, &sk->sk_omem_alloc);
|
||||
mem = kmalloc(size, priority);
|
||||
|
@@ -58,7 +58,7 @@ int dma_skb_copy_datagram_iovec(struct dma_chan *chan,
|
||||
if (copy > len)
|
||||
copy = len;
|
||||
cookie = dma_memcpy_to_iovec(chan, to, pinned_list,
|
||||
skb->data + offset, copy);
|
||||
skb->data + offset, copy);
|
||||
if (cookie < 0)
|
||||
goto fault;
|
||||
len -= copy;
|
||||
@@ -108,8 +108,8 @@ int dma_skb_copy_datagram_iovec(struct dma_chan *chan,
|
||||
if (copy > len)
|
||||
copy = len;
|
||||
cookie = dma_skb_copy_datagram_iovec(chan, list,
|
||||
offset - start, to, copy,
|
||||
pinned_list);
|
||||
offset - start, to, copy,
|
||||
pinned_list);
|
||||
if (cookie < 0)
|
||||
goto fault;
|
||||
len -= copy;
|
||||
@@ -128,5 +128,5 @@ end:
|
||||
}
|
||||
|
||||
fault:
|
||||
return -EFAULT;
|
||||
return -EFAULT;
|
||||
}
|
||||
|
@@ -2015,7 +2015,7 @@ void wireless_send_event(struct net_device * dev,
|
||||
* The best the driver could do is to log an error message.
|
||||
* We will do it ourselves instead...
|
||||
*/
|
||||
printk(KERN_ERR "%s (WE) : Invalid/Unknown Wireless Event (0x%04X)\n",
|
||||
printk(KERN_ERR "%s (WE) : Invalid/Unknown Wireless Event (0x%04X)\n",
|
||||
dev->name, cmd);
|
||||
return;
|
||||
}
|
||||
@@ -2029,11 +2029,11 @@ void wireless_send_event(struct net_device * dev,
|
||||
if(descr->header_type == IW_HEADER_TYPE_POINT) {
|
||||
/* Check if number of token fits within bounds */
|
||||
if(wrqu->data.length > descr->max_tokens) {
|
||||
printk(KERN_ERR "%s (WE) : Wireless Event too big (%d)\n", dev->name, wrqu->data.length);
|
||||
printk(KERN_ERR "%s (WE) : Wireless Event too big (%d)\n", dev->name, wrqu->data.length);
|
||||
return;
|
||||
}
|
||||
if(wrqu->data.length < descr->min_tokens) {
|
||||
printk(KERN_ERR "%s (WE) : Wireless Event too small (%d)\n", dev->name, wrqu->data.length);
|
||||
printk(KERN_ERR "%s (WE) : Wireless Event too small (%d)\n", dev->name, wrqu->data.length);
|
||||
return;
|
||||
}
|
||||
/* Calculate extra_len - extra is NULL for restricted events */
|
||||
|
Reference in New Issue
Block a user