aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authortanxiaojun <tanxiaojun@huawei.com>2013-12-19 00:28:12 -0500
committerDavid S. Miller <davem@davemloft.net>2013-12-19 19:27:26 -0500
commit31a5b837c2e0d282f36d06a2b96f16d97464fd68 (patch)
tree6ddc619a75aa0b4a016c6f07c2b1b5093740d954 /net/bridge
parenta97bfc1d1f2b4496d01fda34fc546451f1c02bf5 (diff)
bridge: add space before '(/{', after ',', etc.
Spaces required before the open parenthesis '(', before the open brace '{', after that ',' and around that '?/:'. Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_ioctl.c2
-rw-r--r--net/bridge/br_private.h2
-rw-r--r--net/bridge/br_stp_timer.c2
-rw-r--r--net/bridge/br_sysfs_if.c2
-rw-r--r--net/bridge/netfilter/ebt_log.c2
-rw-r--r--net/bridge/netfilter/ebt_snat.c2
-rw-r--r--net/bridge/netfilter/ebtables.c12
7 files changed, 12 insertions, 12 deletions
diff --git a/net/bridge/br_ioctl.c b/net/bridge/br_ioctl.c
index cd8c3a44ab7d..a9a4a1b7863d 100644
--- a/net/bridge/br_ioctl.c
+++ b/net/bridge/br_ioctl.c
@@ -381,7 +381,7 @@ int br_dev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
381{ 381{
382 struct net_bridge *br = netdev_priv(dev); 382 struct net_bridge *br = netdev_priv(dev);
383 383
384 switch(cmd) { 384 switch (cmd) {
385 case SIOCDEVPRIVATE: 385 case SIOCDEVPRIVATE:
386 return old_dev_ioctl(dev, rq, cmd); 386 return old_dev_ioctl(dev, rq, cmd);
387 387
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 045d56eaeca2..2e77d923c8ee 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -721,7 +721,7 @@ void br_netfilter_fini(void);
721void br_netfilter_rtable_init(struct net_bridge *); 721void br_netfilter_rtable_init(struct net_bridge *);
722#else 722#else
723#define br_netfilter_init() (0) 723#define br_netfilter_init() (0)
724#define br_netfilter_fini() do { } while(0) 724#define br_netfilter_fini() do { } while (0)
725#define br_netfilter_rtable_init(x) 725#define br_netfilter_rtable_init(x)
726#endif 726#endif
727 727
diff --git a/net/bridge/br_stp_timer.c b/net/bridge/br_stp_timer.c
index 950663d4d330..558c46d19e05 100644
--- a/net/bridge/br_stp_timer.c
+++ b/net/bridge/br_stp_timer.c
@@ -110,7 +110,7 @@ static void br_tcn_timer_expired(unsigned long arg)
110 if (!br_is_root_bridge(br) && (br->dev->flags & IFF_UP)) { 110 if (!br_is_root_bridge(br) && (br->dev->flags & IFF_UP)) {
111 br_transmit_tcn(br); 111 br_transmit_tcn(br);
112 112
113 mod_timer(&br->tcn_timer,jiffies + br->bridge_hello_time); 113 mod_timer(&br->tcn_timer, jiffies + br->bridge_hello_time);
114 } 114 }
115 spin_unlock(&br->lock); 115 spin_unlock(&br->lock);
116} 116}
diff --git a/net/bridge/br_sysfs_if.c b/net/bridge/br_sysfs_if.c
index 2a2cdb756d51..1549b26ad4e5 100644
--- a/net/bridge/br_sysfs_if.c
+++ b/net/bridge/br_sysfs_if.c
@@ -26,7 +26,7 @@ struct brport_attribute {
26 int (*store)(struct net_bridge_port *, unsigned long); 26 int (*store)(struct net_bridge_port *, unsigned long);
27}; 27};
28 28
29#define BRPORT_ATTR(_name,_mode,_show,_store) \ 29#define BRPORT_ATTR(_name, _mode, _show, _store) \
30const struct brport_attribute brport_attr_##_name = { \ 30const struct brport_attribute brport_attr_##_name = { \
31 .attr = {.name = __stringify(_name), \ 31 .attr = {.name = __stringify(_name), \
32 .mode = _mode }, \ 32 .mode = _mode }, \
diff --git a/net/bridge/netfilter/ebt_log.c b/net/bridge/netfilter/ebt_log.c
index 19c37a4929bc..5322a36867a3 100644
--- a/net/bridge/netfilter/ebt_log.c
+++ b/net/bridge/netfilter/ebt_log.c
@@ -96,7 +96,7 @@ ebt_log_packet(struct net *net, u_int8_t pf, unsigned int hooknum,
96 bitmask = NF_LOG_MASK; 96 bitmask = NF_LOG_MASK;
97 97
98 if ((bitmask & EBT_LOG_IP) && eth_hdr(skb)->h_proto == 98 if ((bitmask & EBT_LOG_IP) && eth_hdr(skb)->h_proto ==
99 htons(ETH_P_IP)){ 99 htons(ETH_P_IP)) {
100 const struct iphdr *ih; 100 const struct iphdr *ih;
101 struct iphdr _iph; 101 struct iphdr _iph;
102 102
diff --git a/net/bridge/netfilter/ebt_snat.c b/net/bridge/netfilter/ebt_snat.c
index f8f0bd1a1d51..0f6b118d6cb2 100644
--- a/net/bridge/netfilter/ebt_snat.c
+++ b/net/bridge/netfilter/ebt_snat.c
@@ -35,7 +35,7 @@ ebt_snat_tg(struct sk_buff *skb, const struct xt_action_param *par)
35 return EBT_DROP; 35 return EBT_DROP;
36 if (ap->ar_hln != ETH_ALEN) 36 if (ap->ar_hln != ETH_ALEN)
37 goto out; 37 goto out;
38 if (skb_store_bits(skb, sizeof(_ah), info->mac,ETH_ALEN)) 38 if (skb_store_bits(skb, sizeof(_ah), info->mac, ETH_ALEN))
39 return EBT_DROP; 39 return EBT_DROP;
40 } 40 }
41out: 41out:
diff --git a/net/bridge/netfilter/ebtables.c b/net/bridge/netfilter/ebtables.c
index 09d16d76e4c8..185aa9ca2a02 100644
--- a/net/bridge/netfilter/ebtables.c
+++ b/net/bridge/netfilter/ebtables.c
@@ -121,7 +121,7 @@ ebt_dev_check(const char *entry, const struct net_device *device)
121 return devname[i] != entry[i] && entry[i] != 1; 121 return devname[i] != entry[i] && entry[i] != 1;
122} 122}
123 123
124#define FWINV2(bool,invflg) ((bool) ^ !!(e->invflags & invflg)) 124#define FWINV2(bool, invflg) ((bool) ^ !!(e->invflags & invflg))
125/* process standard matches */ 125/* process standard matches */
126static inline int 126static inline int
127ebt_basic_match(const struct ebt_entry *e, const struct sk_buff *skb, 127ebt_basic_match(const struct ebt_entry *e, const struct sk_buff *skb,
@@ -1441,7 +1441,7 @@ static int copy_everything_to_user(struct ebt_table *t, void __user *user,
1441 return -EFAULT; 1441 return -EFAULT;
1442 1442
1443 if (*len != sizeof(struct ebt_replace) + entries_size + 1443 if (*len != sizeof(struct ebt_replace) + entries_size +
1444 (tmp.num_counters? nentries * sizeof(struct ebt_counter): 0)) 1444 (tmp.num_counters ? nentries * sizeof(struct ebt_counter) : 0))
1445 return -EINVAL; 1445 return -EINVAL;
1446 1446
1447 if (tmp.nentries != nentries) { 1447 if (tmp.nentries != nentries) {
@@ -1477,7 +1477,7 @@ static int do_ebt_set_ctl(struct sock *sk,
1477 if (!ns_capable(net->user_ns, CAP_NET_ADMIN)) 1477 if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
1478 return -EPERM; 1478 return -EPERM;
1479 1479
1480 switch(cmd) { 1480 switch (cmd) {
1481 case EBT_SO_SET_ENTRIES: 1481 case EBT_SO_SET_ENTRIES:
1482 ret = do_replace(net, user, len); 1482 ret = do_replace(net, user, len);
1483 break; 1483 break;
@@ -1507,10 +1507,10 @@ static int do_ebt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
1507 if (!t) 1507 if (!t)
1508 return ret; 1508 return ret;
1509 1509
1510 switch(cmd) { 1510 switch (cmd) {
1511 case EBT_SO_GET_INFO: 1511 case EBT_SO_GET_INFO:
1512 case EBT_SO_GET_INIT_INFO: 1512 case EBT_SO_GET_INIT_INFO:
1513 if (*len != sizeof(struct ebt_replace)){ 1513 if (*len != sizeof(struct ebt_replace)) {
1514 ret = -EINVAL; 1514 ret = -EINVAL;
1515 mutex_unlock(&ebt_mutex); 1515 mutex_unlock(&ebt_mutex);
1516 break; 1516 break;
@@ -1525,7 +1525,7 @@ static int do_ebt_get_ctl(struct sock *sk, int cmd, void __user *user, int *len)
1525 tmp.valid_hooks = t->table->valid_hooks; 1525 tmp.valid_hooks = t->table->valid_hooks;
1526 } 1526 }
1527 mutex_unlock(&ebt_mutex); 1527 mutex_unlock(&ebt_mutex);
1528 if (copy_to_user(user, &tmp, *len) != 0){ 1528 if (copy_to_user(user, &tmp, *len) != 0) {
1529 BUGPRINT("c2u Didn't work\n"); 1529 BUGPRINT("c2u Didn't work\n");
1530 ret = -EFAULT; 1530 ret = -EFAULT;
1531 break; 1531 break;