diff options
author | Eric Dumazet <eric.dumazet@gmail.com> | 2009-11-04 12:50:58 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-04 12:50:58 -0500 |
commit | d94d9fee9fa4e66a0b91640a694b8b10177075b3 (patch) | |
tree | 330b2b19e63c92f1fef3d9dbe0733ddeb0109664 /include/linux/netdevice.h | |
parent | b8883a65be2d925ea82b14ca0068ce9a6c8bac1f (diff) |
net: cleanup include/linux
This cleanup patch puts struct/union/enum opening braces,
in first line to ease grep games.
struct something
{
becomes :
struct something {
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r-- | include/linux/netdevice.h | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 5077de028317..465add6c43e3 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -125,8 +125,7 @@ typedef enum netdev_tx netdev_tx_t; | |||
125 | * with byte counters. | 125 | * with byte counters. |
126 | */ | 126 | */ |
127 | 127 | ||
128 | struct net_device_stats | 128 | struct net_device_stats { |
129 | { | ||
130 | unsigned long rx_packets; /* total packets received */ | 129 | unsigned long rx_packets; /* total packets received */ |
131 | unsigned long tx_packets; /* total packets transmitted */ | 130 | unsigned long tx_packets; /* total packets transmitted */ |
132 | unsigned long rx_bytes; /* total bytes received */ | 131 | unsigned long rx_bytes; /* total bytes received */ |
@@ -179,8 +178,7 @@ struct neighbour; | |||
179 | struct neigh_parms; | 178 | struct neigh_parms; |
180 | struct sk_buff; | 179 | struct sk_buff; |
181 | 180 | ||
182 | struct netif_rx_stats | 181 | struct netif_rx_stats { |
183 | { | ||
184 | unsigned total; | 182 | unsigned total; |
185 | unsigned dropped; | 183 | unsigned dropped; |
186 | unsigned time_squeeze; | 184 | unsigned time_squeeze; |
@@ -189,8 +187,7 @@ struct netif_rx_stats | |||
189 | 187 | ||
190 | DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat); | 188 | DECLARE_PER_CPU(struct netif_rx_stats, netdev_rx_stat); |
191 | 189 | ||
192 | struct dev_addr_list | 190 | struct dev_addr_list { |
193 | { | ||
194 | struct dev_addr_list *next; | 191 | struct dev_addr_list *next; |
195 | u8 da_addr[MAX_ADDR_LEN]; | 192 | u8 da_addr[MAX_ADDR_LEN]; |
196 | u8 da_addrlen; | 193 | u8 da_addrlen; |
@@ -227,8 +224,7 @@ struct netdev_hw_addr_list { | |||
227 | int count; | 224 | int count; |
228 | }; | 225 | }; |
229 | 226 | ||
230 | struct hh_cache | 227 | struct hh_cache { |
231 | { | ||
232 | struct hh_cache *hh_next; /* Next entry */ | 228 | struct hh_cache *hh_next; /* Next entry */ |
233 | atomic_t hh_refcnt; /* number of users */ | 229 | atomic_t hh_refcnt; /* number of users */ |
234 | /* | 230 | /* |
@@ -291,8 +287,7 @@ struct header_ops { | |||
291 | * code. | 287 | * code. |
292 | */ | 288 | */ |
293 | 289 | ||
294 | enum netdev_state_t | 290 | enum netdev_state_t { |
295 | { | ||
296 | __LINK_STATE_START, | 291 | __LINK_STATE_START, |
297 | __LINK_STATE_PRESENT, | 292 | __LINK_STATE_PRESENT, |
298 | __LINK_STATE_NOCARRIER, | 293 | __LINK_STATE_NOCARRIER, |
@@ -341,8 +336,7 @@ struct napi_struct { | |||
341 | struct sk_buff *skb; | 336 | struct sk_buff *skb; |
342 | }; | 337 | }; |
343 | 338 | ||
344 | enum | 339 | enum { |
345 | { | ||
346 | NAPI_STATE_SCHED, /* Poll is scheduled */ | 340 | NAPI_STATE_SCHED, /* Poll is scheduled */ |
347 | NAPI_STATE_DISABLE, /* Disable pending */ | 341 | NAPI_STATE_DISABLE, /* Disable pending */ |
348 | NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */ | 342 | NAPI_STATE_NPSVC, /* Netpoll - don't dequeue from poll_list */ |
@@ -458,8 +452,7 @@ static inline void napi_synchronize(const struct napi_struct *n) | |||
458 | # define napi_synchronize(n) barrier() | 452 | # define napi_synchronize(n) barrier() |
459 | #endif | 453 | #endif |
460 | 454 | ||
461 | enum netdev_queue_state_t | 455 | enum netdev_queue_state_t { |
462 | { | ||
463 | __QUEUE_STATE_XOFF, | 456 | __QUEUE_STATE_XOFF, |
464 | __QUEUE_STATE_FROZEN, | 457 | __QUEUE_STATE_FROZEN, |
465 | }; | 458 | }; |
@@ -653,8 +646,7 @@ struct net_device_ops { | |||
653 | * moves out. | 646 | * moves out. |
654 | */ | 647 | */ |
655 | 648 | ||
656 | struct net_device | 649 | struct net_device { |
657 | { | ||
658 | 650 | ||
659 | /* | 651 | /* |
660 | * This is the first field of the "visible" part of this structure | 652 | * This is the first field of the "visible" part of this structure |
@@ -1229,8 +1221,7 @@ static inline int unregister_gifconf(unsigned int family) | |||
1229 | * Incoming packets are placed on per-cpu queues so that | 1221 | * Incoming packets are placed on per-cpu queues so that |
1230 | * no locking is needed. | 1222 | * no locking is needed. |
1231 | */ | 1223 | */ |
1232 | struct softnet_data | 1224 | struct softnet_data { |
1233 | { | ||
1234 | struct Qdisc *output_queue; | 1225 | struct Qdisc *output_queue; |
1235 | struct sk_buff_head input_pkt_queue; | 1226 | struct sk_buff_head input_pkt_queue; |
1236 | struct list_head poll_list; | 1227 | struct list_head poll_list; |
@@ -1627,7 +1618,8 @@ static inline int netif_dormant(const struct net_device *dev) | |||
1627 | * | 1618 | * |
1628 | * Check if carrier is operational | 1619 | * Check if carrier is operational |
1629 | */ | 1620 | */ |
1630 | static inline int netif_oper_up(const struct net_device *dev) { | 1621 | static inline int netif_oper_up(const struct net_device *dev) |
1622 | { | ||
1631 | return (dev->operstate == IF_OPER_UP || | 1623 | return (dev->operstate == IF_OPER_UP || |
1632 | dev->operstate == IF_OPER_UNKNOWN /* backward compat */); | 1624 | dev->operstate == IF_OPER_UNKNOWN /* backward compat */); |
1633 | } | 1625 | } |