Commit 4ec93edb authored by YOSHIFUJI Hideaki's avatar YOSHIFUJI Hideaki Committed by David S. Miller
Browse files

[NET] CORE: Fix whitespace errors.


Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9d6f229f
......@@ -430,7 +430,7 @@ EXPORT_SYMBOL(__skb_checksum_complete);
* @skb: skbuff
* @hlen: hardware length
* @iov: io vector
*
*
* Caller _must_ check that skb will fit to this iovec.
*
* Returns: 0 - success.
......
......@@ -255,7 +255,7 @@ static int netdev_nit;
* is linked into kernel lists and may not be freed until it has been
* removed from the kernel lists.
*
* This call does not sleep therefore it can not
* This call does not sleep therefore it can not
* guarantee all CPU's that are in middle of receiving packets
* will see the new packet type (until the next received packet).
*/
......@@ -282,7 +282,7 @@ void dev_add_pack(struct packet_type *pt)
* Remove a protocol handler that was previously added to the kernel
* protocol handlers by dev_add_pack(). The passed &packet_type is removed
* from the kernel lists and can be freed or reused once this function
* returns.
* returns.
*
* The packet type might still be in use by receivers
* and must not be freed until after all the CPU's have gone
......@@ -327,7 +327,7 @@ out:
void dev_remove_pack(struct packet_type *pt)
{
__dev_remove_pack(pt);
synchronize_net();
}
......@@ -607,7 +607,7 @@ EXPORT_SYMBOL(dev_getfirstbyhwtype);
* @mask: bitmask of bits in if_flags to check
*
* Search for any interface with the given flags. Returns NULL if a device
* is not found or a pointer to the device. The device returned has
* is not found or a pointer to the device. The device returned has
* had a reference added and the pointer is safe until the user calls
* dev_put to indicate they have finished with it.
*/
......@@ -802,7 +802,7 @@ void netdev_state_change(struct net_device *dev)
void dev_load(const char *name)
{
struct net_device *dev;
struct net_device *dev;
read_lock(&dev_base_lock);
dev = __dev_get_by_name(name);
......@@ -860,7 +860,7 @@ int dev_open(struct net_device *dev)
clear_bit(__LINK_STATE_START, &dev->state);
}
/*
/*
* If it went open OK then:
*/
......@@ -964,7 +964,7 @@ int dev_close(struct net_device *dev)
* is returned on a failure.
*
* When registered all registration and up events are replayed
* to the new notifier to allow device to have a race free
* to the new notifier to allow device to have a race free
* view of the network device list.
*/
......@@ -979,7 +979,7 @@ int register_netdevice_notifier(struct notifier_block *nb)
for (dev = dev_base; dev; dev = dev->next) {
nb->notifier_call(nb, NETDEV_REGISTER, dev);
if (dev->flags & IFF_UP)
if (dev->flags & IFF_UP)
nb->notifier_call(nb, NETDEV_UP, dev);
}
}
......@@ -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);
......@@ -1197,7 +1197,7 @@ int skb_checksum_help(struct sk_buff *skb)
out_set_summed:
skb->ip_summed = CHECKSUM_NONE;
out:
out:
return ret;
}
......@@ -1258,7 +1258,7 @@ EXPORT_SYMBOL(skb_gso_segment);
void netdev_rx_csum_fault(struct net_device *dev)
{
if (net_ratelimit()) {
printk(KERN_ERR "%s: hw csum failure.\n",
printk(KERN_ERR "%s: hw csum failure.\n",
dev ? dev->name : "<unknown>");
dump_stack();
}
......@@ -1372,7 +1372,7 @@ gso:
if (unlikely(netif_queue_stopped(dev) && skb->next))
return NETDEV_TX_BUSY;
} while (skb->next);
skb->destructor = DEV_GSO_CB(skb)->destructor;
out_kfree_skb:
......@@ -1449,25 +1449,25 @@ 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);
/* Disable soft irqs for various locks below. Also
* stops preemption for RCU.
/* Disable soft irqs for various locks below. Also
* stops preemption for RCU.
*/
rcu_read_lock_bh();
rcu_read_lock_bh();
/* Updates of qdisc are serialized by queue_lock.
* The struct Qdisc which is pointed to by qdisc is now a
* rcu structure - it may be accessed without acquiring
/* Updates of qdisc are serialized by queue_lock.
* The struct Qdisc which is pointed to by qdisc is now a
* rcu structure - it may be accessed without acquiring
* a lock (but the structure may be stale.) The freeing of the
* qdisc will be deferred until it's known that there are no
* qdisc will be deferred until it's known that there are no
* more references to it.
*
* If the qdisc has an enqueue function, we still need to
*
* If the qdisc has an enqueue function, we still need to
* hold the queue_lock before calling it, since queue_lock
* also serializes access to the device queue.
*/
......@@ -1715,8 +1715,8 @@ static __inline__ int handle_bridge(struct sk_buff **pskb,
if (*pt_prev) {
*ret = deliver_skb(*pskb, *pt_prev, orig_dev);
*pt_prev = NULL;
}
}
return br_handle_frame_hook(port, pskb);
}
#else
......@@ -1728,16 +1728,16 @@ static __inline__ int handle_bridge(struct sk_buff **pskb,
* when CONFIG_NET_CLS_ACT is? otherwise some useless instructions
* a compare and 2 stores extra right now if we dont have it on
* but have CONFIG_NET_CLS_ACT
* NOTE: This doesnt stop any functionality; if you dont have
* NOTE: This doesnt stop any functionality; if you dont have
* the ingress scheduler, you just cant add policies on ingress.
*
*/
static int ing_filter(struct sk_buff *skb)
static int ing_filter(struct sk_buff *skb)
{
struct Qdisc *q;
struct net_device *dev = skb->dev;
int result = TC_ACT_OK;
if (dev->qdisc_ingress) {
__u32 ttl = (__u32) G_TC_RTTL(skb->tc_verd);
if (MAX_RED_LOOP < ttl++) {
......@@ -1801,7 +1801,7 @@ int netif_receive_skb(struct sk_buff *skb)
list_for_each_entry_rcu(ptype, &ptype_all, list) {
if (!ptype->dev || ptype->dev == skb->dev) {
if (pt_prev)
if (pt_prev)
ret = deliver_skb(skb, pt_prev, orig_dev);
pt_prev = ptype;
}
......@@ -1833,7 +1833,7 @@ ncls:
list_for_each_entry_rcu(ptype, &ptype_base[ntohs(type)&15], list) {
if (ptype->type == type &&
(!ptype->dev || ptype->dev == skb->dev)) {
if (pt_prev)
if (pt_prev)
ret = deliver_skb(skb, pt_prev, orig_dev);
pt_prev = ptype;
}
......@@ -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
......@@ -2282,7 +2282,7 @@ int netdev_set_master(struct net_device *slave, struct net_device *master)
}
slave->master = master;
synchronize_net();
if (old)
......@@ -2319,13 +2319,13 @@ 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",
dev->name, (dev->flags & IFF_PROMISC),
(old_flags & IFF_PROMISC),
audit_get_loginuid(current->audit_context));
audit_get_loginuid(current->audit_context));
}
}
......@@ -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;
}
......@@ -2906,7 +2906,7 @@ int register_netdevice(struct net_device *dev)
goto out;
}
}
if (!dev_valid_name(dev->name)) {
ret = -EINVAL;
goto out;
......@@ -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) &&
......@@ -3024,7 +3024,7 @@ int register_netdev(struct net_device *dev)
if (err < 0)
goto out;
}
err = register_netdevice(dev);
out:
rtnl_unlock();
......@@ -3041,7 +3041,7 @@ EXPORT_SYMBOL(register_netdev);
* for netdevice notification, and cleanup and put back the
* reference if they receive an UNREGISTER event.
* We can get stuck here if buggy protocols don't correctly
* call dev_put.
* call dev_put.
*/
static void netdev_wait_allrefs(struct net_device *dev)
{
......@@ -3205,8 +3205,8 @@ EXPORT_SYMBOL(alloc_netdev);
* free_netdev - free network device
* @dev: device
*
* This function does the last stage of destroying an allocated device
* interface. The reference to the device object is released.
* This function does the last stage of destroying an allocated device
* interface. The reference to the device object is released.
* If this is the last reference then it will be freed.
*/
void free_netdev(struct net_device *dev)
......@@ -3227,9 +3227,9 @@ void free_netdev(struct net_device *dev)
kfree((char *)dev - dev->padded);
#endif
}
/* Synchronize with packet receive processing. */
void synchronize_net(void)
void synchronize_net(void)
{
might_sleep();
synchronize_rcu();
......@@ -3291,12 +3291,12 @@ void unregister_netdevice(struct net_device *dev)
/* Shutdown queueing discipline. */
dev_shutdown(dev);
/* Notify protocols, that we are about to destroy
this device. They should clean all the things.
*/
raw_notifier_call_chain(&netdev_chain, NETDEV_UNREGISTER, dev);
/*
* Flush the multicast chain
*/
......@@ -3483,7 +3483,7 @@ static int __init net_dev_init(void)
goto out;
INIT_LIST_HEAD(&ptype_all);
for (i = 0; i < 16; i++)
for (i = 0; i < 16; i++)
INIT_LIST_HEAD(&ptype_base[i]);
for (i = 0; i < ARRAY_SIZE(dev_name_head); i++)
......
/*
* Linux NET3: Multicast List maintenance.
* Linux NET3: Multicast List maintenance.
*
* Authors:
* Tim Kordas <tjk@nostromo.eeap.cwru.edu>
* Tim Kordas <tjk@nostromo.eeap.cwru.edu>
* Richard Underwood <richard@wuzz.demon.co.uk>
*
* Stir fried together from the IP multicast and CAP patches above
* Alan Cox <Alan.Cox@linux.org>
* Alan Cox <Alan.Cox@linux.org>
*
* Fixes:
* Alan Cox : Update the device on a real delete
......@@ -50,11 +50,11 @@
/*
* Device multicast list maintenance.
* Device multicast list maintenance.
*
* This is used both by IP and by the user level maintenance functions.
* Unlike BSD we maintain a usage count on a given multicast address so
* that a casual user application can add/delete multicasts used by
* This is used both by IP and by the user level maintenance functions.
* Unlike BSD we maintain a usage count on a given multicast address so
* that a casual user application can add/delete multicasts used by
* protocols without doing damage to the protocols when it deletes the
* entries. It also helps IP as it tracks overlapping maps.
*
......@@ -67,7 +67,7 @@
/*
* Update the multicast list into the physical NIC controller.
*/
static void __dev_mc_upload(struct net_device *dev)
{
/* Don't do anything till we up the interface
......@@ -100,7 +100,7 @@ void dev_mc_upload(struct net_device *dev)
/*
* Delete a device level multicast
*/
int dev_mc_delete(struct net_device *dev, void *addr, int alen, int glbl)
{
int err = 0;
......@@ -137,7 +137,7 @@ int dev_mc_delete(struct net_device *dev, void *addr, int alen, int glbl)
* loaded filter is now wrong. Fix it
*/
__dev_mc_upload(dev);
netif_tx_unlock_bh(dev);
return 0;
}
......@@ -151,7 +151,7 @@ done:
/*
* Add a device level multicast
*/
int dev_mc_add(struct net_device *dev, void *addr, int alen, int glbl)
{
int err = 0;
......@@ -187,7 +187,7 @@ int dev_mc_add(struct net_device *dev, void *addr, int alen, int glbl)
dev->mc_count++;
__dev_mc_upload(dev);
netif_tx_unlock_bh(dev);
return 0;
......@@ -204,7 +204,7 @@ done:
void dev_mc_discard(struct net_device *dev)
{
netif_tx_lock_bh(dev);
while (dev->mc_list != NULL) {
struct dev_mc_list *tmp = dev->mc_list;
dev->mc_list = tmp->next;
......@@ -225,7 +225,7 @@ static void *dev_mc_seq_start(struct seq_file *seq, loff_t *pos)
read_lock(&dev_base_lock);
for (dev = dev_base; dev; dev = dev->next) {
if (off++ == *pos)
if (off++ == *pos)
return dev;
}
return NULL;
......
......@@ -29,7 +29,7 @@
* 4) All operations modify state, so a spinlock is used.
*/
static struct dst_entry *dst_garbage_list;
#if RT_CACHE_DEBUG >= 2
#if RT_CACHE_DEBUG >= 2
static atomic_t dst_total = ATOMIC_INIT(0);
#endif
static DEFINE_SPINLOCK(dst_lock);
......@@ -142,7 +142,7 @@ void * dst_alloc(struct dst_ops * ops)
dst->path = dst;
dst->input = dst_discard_in;
dst->output = dst_discard_out;
#if RT_CACHE_DEBUG >= 2
#if RT_CACHE_DEBUG >= 2
atomic_inc(&dst_total);
#endif
atomic_inc(&ops->entries);
......@@ -203,7 +203,7 @@ again:
dst->ops->destroy(dst);
if (dst->dev)
dev_put(dst->dev);
#if RT_CACHE_DEBUG >= 2
#if RT_CACHE_DEBUG >= 2
atomic_dec(&dst_total);
#endif
kmem_cache_free(dst->ops->kmem_cachep, dst);
......
......@@ -17,7 +17,7 @@
#include <linux/netdevice.h>
#include <asm/uaccess.h>
/*
/*
* Some useful ethtool_ops methods that're device independent.
* If we find that all drivers want to do the same thing here,
* we can turn these into dev_() function calls.
......@@ -87,12 +87,12 @@ int ethtool_op_get_perm_addr(struct net_device *dev, struct ethtool_perm_addr *a
unsigned char len = dev->addr_len;
if ( addr->size < len )
return -ETOOSMALL;
addr->size = len;
memcpy(data, dev->perm_addr, len);
return 0;
}
u32 ethtool_op_get_ufo(struct net_device *dev)
{
......@@ -550,7 +550,7 @@ static int ethtool_set_sg(struct net_device *dev, char __user *useraddr)
if (copy_from_user(&edata, useraddr, sizeof(edata)))
return -EFAULT;
if (edata.data &&
if (edata.data &&
!(dev->features & NETIF_F_ALL_CSUM))
return -EINVAL;
......@@ -951,7 +951,7 @@ int dev_ethtool(struct ifreq *ifr)
default:
rc = -EOPNOTSUPP;
}
if(dev->ethtool_ops->complete)
dev->ethtool_ops->complete(dev);
......
......@@ -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);
......@@ -91,7 +91,7 @@ unsigned int sk_run_filter(struct sk_buff *skb, struct sock_filter *filter, int
*/
for (pc = 0; pc < flen; pc++) {
fentry = &filter[pc];
switch (fentry->code) {
case BPF_ALU|BPF_ADD|BPF_X:
A += X;
......@@ -399,7 +399,7 @@ int sk_chk_filter(struct sock_filter *filter, int flen)
*/
int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk)
{
struct sk_filter *fp;
struct sk_filter *fp;
unsigned int fsize = sizeof(struct sock_filter) * fprog->len;
int err;
......@@ -411,7 +411,7 @@ int sk_attach_filter(struct sock_fprog *fprog, struct sock *sk)
if (!fp)
return -ENOMEM;
if (copy_from_user(fp->insns, fprog->filter, fsize)) {
sock_kfree_s(sk, fp, fsize+sizeof(*fp));
sock_kfree_s(sk, fp, fsize+sizeof(*fp));
return -EFAULT;
}
......
......@@ -144,7 +144,7 @@ static void est_timer(unsigned long arg)
* configuration TLV is created. Upon each interval, the latest statistics
* will be read from &bstats and the estimated rate will be stored in
* &rate_est with the statistics lock grabed during this period.
*
*
* Returns 0 on success or a negative error code.
*/
int gen_new_estimator(struct gnet_stats_basic *bstats,
......@@ -231,7 +231,7 @@ void gen_kill_estimator(struct gnet_stats_basic *bstats,
*
* Replaces the configuration of a rate estimator by calling
* gen_kill_estimator() and gen_new_estimator().
*
*
* Returns 0 on success or a negative error code.
*/
int
......@@ -242,7 +242,7 @@ gen_replace_estimator(struct gnet_stats_basic *bstats,
gen_kill_estimator(bstats, rate_est);
return gen_new_estimator(bstats, rate_est, stats_lock, opt);
}
EXPORT_SYMBOL(gen_kill_estimator);
EXPORT_SYMBOL(gen_new_estimator);
......
......@@ -57,7 +57,7 @@ gnet_stats_start_copy_compat(struct sk_buff *skb, int type, int tc_stats_type,
int xstats_type, spinlock_t *lock, struct gnet_dump *d)
{
memset(d, 0, sizeof(*d));
spin_lock_bh(lock);
d->lock = lock;
if (type)
......
......@@ -40,7 +40,7 @@
int verify_iovec(struct msghdr *m, struct iovec *iov, char *address, int mode)
{
int size, err, ct;
if (m->msg_namelen) {
if (mode == VERIFY_READ) {
err = move_addr_to_kernel(m->msg_name, m->msg_namelen,
......@@ -79,7 +79,7 @@ int verify_iovec(struct msghdr *m, struct iovec *iov, char *address, int mode)
*
* Note: this modifies the original iovec.
*/
int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len)
{
while (len > 0) {
......@@ -103,7 +103,7 @@ int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len)
*
* Note: this modifies the original iovec.
*/
int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len)
{
while (len > 0) {
......@@ -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;
......
......@@ -124,7 +124,7 @@ void linkwatch_run_queue(void)
dev_put(dev);
}
}
}
static void linkwatch_event(struct work_struct *dummy)
......@@ -133,7 +133,7 @@ static void linkwatch_event(struct work_struct *dummy)
* per second so that a runaway driver does not
* cause a storm of messages on the netlink
* socket
*/
*/
linkwatch_nextevent = jiffies + HZ;
clear_bit(LW_RUNNING, &linkwatch_flags);
......
......@@ -345,7 +345,7 @@ struct neighbour *neigh_lookup(struct neigh_table *tbl, const void *pkey,
struct neighbour *n;
int key_len = tbl->key_len;
u32 hash_val = tbl->hash(pkey, dev);
NEIGH_CACHE_STAT_INC(tbl, lookups);
read_lock_bh(&tbl->lock);
......@@ -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);
......@@ -744,7 +744,7 @@ static void neigh_timer_handler(unsigned long arg)
}