Commit fd2c3ef7 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

net: cleanup include/net

This cleanup patch puts struct/union/enum opening braces,
in first line to ease grep games.

struct something
{

becomes :

struct something {
Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4b7673a0
...@@ -8,8 +8,7 @@ ...@@ -8,8 +8,7 @@
struct crypto_ahash; struct crypto_ahash;
struct ah_data struct ah_data {
{
int icv_full_len; int icv_full_len;
int icv_trunc_len; int icv_trunc_len;
......
...@@ -97,16 +97,14 @@ struct dn_dev { ...@@ -97,16 +97,14 @@ struct dn_dev {
unsigned long uptime; /* Time device went up in jiffies */ unsigned long uptime; /* Time device went up in jiffies */
}; };
struct dn_short_packet struct dn_short_packet {
{
__u8 msgflg; __u8 msgflg;
__le16 dstnode; __le16 dstnode;
__le16 srcnode; __le16 srcnode;
__u8 forward; __u8 forward;
} __attribute__((packed)); } __attribute__((packed));
struct dn_long_packet struct dn_long_packet {
{
__u8 msgflg; __u8 msgflg;
__u8 d_area; __u8 d_area;
__u8 d_subarea; __u8 d_subarea;
...@@ -122,8 +120,7 @@ struct dn_long_packet ...@@ -122,8 +120,7 @@ struct dn_long_packet
/*------------------------- DRP - Routing messages ---------------------*/ /*------------------------- DRP - Routing messages ---------------------*/
struct endnode_hello_message struct endnode_hello_message {
{
__u8 msgflg; __u8 msgflg;
__u8 tiver[3]; __u8 tiver[3];
__u8 id[6]; __u8 id[6];
...@@ -138,8 +135,7 @@ struct endnode_hello_message ...@@ -138,8 +135,7 @@ struct endnode_hello_message
__u8 data[2]; __u8 data[2];
} __attribute__((packed)); } __attribute__((packed));
struct rtnode_hello_message struct rtnode_hello_message {
{
__u8 msgflg; __u8 msgflg;
__u8 tiver[3]; __u8 tiver[3];
__u8 id[6]; __u8 id[6];
......
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
/* WARNING: The ordering of these elements must match ordering /* WARNING: The ordering of these elements must match ordering
* of RTA_* rtnetlink attribute numbers. * of RTA_* rtnetlink attribute numbers.
*/ */
struct dn_kern_rta struct dn_kern_rta {
{
void *rta_dst; void *rta_dst;
void *rta_src; void *rta_src;
int *rta_iif; int *rta_iif;
......
...@@ -70,30 +70,26 @@ extern struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int nobl ...@@ -70,30 +70,26 @@ extern struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int nobl
/* Data Messages (data segment/interrupt/link service) */ /* Data Messages (data segment/interrupt/link service) */
struct nsp_data_seg_msg struct nsp_data_seg_msg {
{
__u8 msgflg; __u8 msgflg;
__le16 dstaddr; __le16 dstaddr;
__le16 srcaddr; __le16 srcaddr;
} __attribute__((packed)); } __attribute__((packed));
struct nsp_data_opt_msg struct nsp_data_opt_msg {
{
__le16 acknum; __le16 acknum;
__le16 segnum; __le16 segnum;
__le16 lsflgs; __le16 lsflgs;
} __attribute__((packed)); } __attribute__((packed));
struct nsp_data_opt_msg1 struct nsp_data_opt_msg1 {
{
__le16 acknum; __le16 acknum;
__le16 segnum; __le16 segnum;
} __attribute__((packed)); } __attribute__((packed));
/* Acknowledgment Message (data/other data) */ /* Acknowledgment Message (data/other data) */
struct nsp_data_ack_msg struct nsp_data_ack_msg {
{
__u8 msgflg; __u8 msgflg;
__le16 dstaddr; __le16 dstaddr;
__le16 srcaddr; __le16 srcaddr;
...@@ -101,16 +97,14 @@ struct nsp_data_ack_msg ...@@ -101,16 +97,14 @@ struct nsp_data_ack_msg
} __attribute__((packed)); } __attribute__((packed));
/* Connect Acknowledgment Message */ /* Connect Acknowledgment Message */
struct nsp_conn_ack_msg struct nsp_conn_ack_msg {
{
__u8 msgflg; __u8 msgflg;
__le16 dstaddr; __le16 dstaddr;
} __attribute__((packed)); } __attribute__((packed));
/* Connect Initiate/Retransmit Initiate/Connect Confirm */ /* Connect Initiate/Retransmit Initiate/Connect Confirm */
struct nsp_conn_init_msg struct nsp_conn_init_msg {
{
__u8 msgflg; __u8 msgflg;
#define NSP_CI 0x18 /* Connect Initiate */ #define NSP_CI 0x18 /* Connect Initiate */
#define NSP_RCI 0x68 /* Retrans. Conn Init */ #define NSP_RCI 0x68 /* Retrans. Conn Init */
...@@ -126,8 +120,7 @@ struct nsp_conn_init_msg ...@@ -126,8 +120,7 @@ struct nsp_conn_init_msg
} __attribute__((packed)); } __attribute__((packed));
/* Disconnect Initiate/Disconnect Confirm */ /* Disconnect Initiate/Disconnect Confirm */
struct nsp_disconn_init_msg struct nsp_disconn_init_msg {
{
__u8 msgflg; __u8 msgflg;
__le16 dstaddr; __le16 dstaddr;
__le16 srcaddr; __le16 srcaddr;
...@@ -136,8 +129,7 @@ struct nsp_disconn_init_msg ...@@ -136,8 +129,7 @@ struct nsp_disconn_init_msg
struct srcobj_fmt struct srcobj_fmt {
{
__u8 format; __u8 format;
__u8 task; __u8 task;
__le16 grpcode; __le16 grpcode;
......
...@@ -36,8 +36,7 @@ ...@@ -36,8 +36,7 @@
struct sk_buff; struct sk_buff;
struct dst_entry struct dst_entry {
{
struct rcu_head rcu_head; struct rcu_head rcu_head;
struct dst_entry *child; struct dst_entry *child;
struct net_device *dev; struct net_device *dev;
......
...@@ -7,8 +7,7 @@ ...@@ -7,8 +7,7 @@
#include <net/flow.h> #include <net/flow.h>
#include <net/rtnetlink.h> #include <net/rtnetlink.h>
struct fib_rule struct fib_rule {
{
struct list_head list; struct list_head list;
atomic_t refcnt; atomic_t refcnt;
int ifindex; int ifindex;
...@@ -25,15 +24,13 @@ struct fib_rule ...@@ -25,15 +24,13 @@ struct fib_rule
struct net * fr_net; struct net * fr_net;
}; };
struct fib_lookup_arg struct fib_lookup_arg {
{
void *lookup_ptr; void *lookup_ptr;
void *result; void *result;
struct fib_rule *rule; struct fib_rule *rule;
}; };
struct fib_rules_ops struct fib_rules_ops {
{
int family; int family;
struct list_head list; struct list_head list;
int rule_size; int rule_size;
......
...@@ -6,8 +6,7 @@ ...@@ -6,8 +6,7 @@
#include <linux/rtnetlink.h> #include <linux/rtnetlink.h>
#include <linux/pkt_sched.h> #include <linux/pkt_sched.h>
struct gnet_dump struct gnet_dump {
{
spinlock_t * lock; spinlock_t * lock;
struct sk_buff * skb; struct sk_buff * skb;
struct nlattr * tail; struct nlattr * tail;
......
...@@ -13,8 +13,7 @@ ...@@ -13,8 +13,7 @@
* @list: list entry for linking * @list: list entry for linking
* @family: pointer to family, need not be set before registering * @family: pointer to family, need not be set before registering
*/ */
struct genl_multicast_group struct genl_multicast_group {
{
struct genl_family *family; /* private */ struct genl_family *family; /* private */
struct list_head list; /* private */ struct list_head list; /* private */
char name[GENL_NAMSIZ]; char name[GENL_NAMSIZ];
...@@ -35,8 +34,7 @@ struct genl_multicast_group ...@@ -35,8 +34,7 @@ struct genl_multicast_group
* @family_list: family list * @family_list: family list
* @mcast_groups: multicast groups list * @mcast_groups: multicast groups list
*/ */
struct genl_family struct genl_family {
{
unsigned int id; unsigned int id;
unsigned int hdrsize; unsigned int hdrsize;
char name[GENL_NAMSIZ]; char name[GENL_NAMSIZ];
...@@ -58,8 +56,7 @@ struct genl_family ...@@ -58,8 +56,7 @@ struct genl_family
* @userhdr: user specific header * @userhdr: user specific header
* @attrs: netlink attributes * @attrs: netlink attributes
*/ */
struct genl_info struct genl_info {
{
u32 snd_seq; u32 snd_seq;
u32 snd_pid; u32 snd_pid;
struct nlmsghdr * nlhdr; struct nlmsghdr * nlhdr;
...@@ -102,8 +99,7 @@ static inline void genl_info_net_set(struct genl_info *info, struct net *net) ...@@ -102,8 +99,7 @@ static inline void genl_info_net_set(struct genl_info *info, struct net *net)
* @done: completion callback for dumps * @done: completion callback for dumps
* @ops_list: operations list * @ops_list: operations list
*/ */
struct genl_ops struct genl_ops {
{
u8 cmd; u8 cmd;
unsigned int flags; unsigned int flags;
const struct nla_policy *policy; const struct nla_policy *policy;
......
...@@ -32,8 +32,7 @@ ...@@ -32,8 +32,7 @@
#ifdef __KERNEL__ #ifdef __KERNEL__
struct inet6_ifaddr struct inet6_ifaddr {
{
struct in6_addr addr; struct in6_addr addr;
__u32 prefix_len; __u32 prefix_len;
...@@ -67,8 +66,7 @@ struct inet6_ifaddr ...@@ -67,8 +66,7 @@ struct inet6_ifaddr
int dead; int dead;
}; };
struct ip6_sf_socklist struct ip6_sf_socklist {
{
unsigned int sl_max; unsigned int sl_max;
unsigned int sl_count; unsigned int sl_count;
struct in6_addr sl_addr[0]; struct in6_addr sl_addr[0];
...@@ -79,8 +77,7 @@ struct ip6_sf_socklist ...@@ -79,8 +77,7 @@ struct ip6_sf_socklist
#define IP6_SFBLOCK 10 /* allocate this many at once */ #define IP6_SFBLOCK 10 /* allocate this many at once */
struct ipv6_mc_socklist struct ipv6_mc_socklist {
{
struct in6_addr addr; struct in6_addr addr;
int ifindex; int ifindex;
struct ipv6_mc_socklist *next; struct ipv6_mc_socklist *next;
...@@ -89,8 +86,7 @@ struct ipv6_mc_socklist ...@@ -89,8 +86,7 @@ struct ipv6_mc_socklist
struct ip6_sf_socklist *sflist; struct ip6_sf_socklist *sflist;
}; };
struct ip6_sf_list struct ip6_sf_list {
{
struct ip6_sf_list *sf_next; struct ip6_sf_list *sf_next;
struct in6_addr sf_addr; struct in6_addr sf_addr;
unsigned long sf_count[2]; /* include/exclude counts */ unsigned long sf_count[2]; /* include/exclude counts */
...@@ -105,8 +101,7 @@ struct ip6_sf_list ...@@ -105,8 +101,7 @@ struct ip6_sf_list
#define MAF_NOREPORT 0x08 #define MAF_NOREPORT 0x08
#define MAF_GSQUERY 0x10 #define MAF_GSQUERY 0x10
struct ifmcaddr6 struct ifmcaddr6 {
{
struct in6_addr mca_addr; struct in6_addr mca_addr;
struct inet6_dev *idev; struct inet6_dev *idev;
struct ifmcaddr6 *next; struct ifmcaddr6 *next;
...@@ -126,15 +121,13 @@ struct ifmcaddr6 ...@@ -126,15 +121,13 @@ struct ifmcaddr6
/* Anycast stuff */ /* Anycast stuff */
struct ipv6_ac_socklist struct ipv6_ac_socklist {
{
struct in6_addr acl_addr; struct in6_addr acl_addr;
int acl_ifindex; int acl_ifindex;
struct ipv6_ac_socklist *acl_next; struct ipv6_ac_socklist *acl_next;
}; };
struct ifacaddr6 struct ifacaddr6 {
{
struct in6_addr aca_addr; struct in6_addr aca_addr;
struct inet6_dev *aca_idev; struct inet6_dev *aca_idev;
struct rt6_info *aca_rt; struct rt6_info *aca_rt;
...@@ -157,8 +150,7 @@ struct ipv6_devstat { ...@@ -157,8 +150,7 @@ struct ipv6_devstat {
DEFINE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg); DEFINE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg);
}; };
struct inet6_dev struct inet6_dev {
{
struct net_device *dev; struct net_device *dev;
struct inet6_ifaddr *addr_list; struct inet6_ifaddr *addr_list;
......
...@@ -13,8 +13,7 @@ ...@@ -13,8 +13,7 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <asm/atomic.h> #include <asm/atomic.h>
struct inet_peer struct inet_peer {
{
/* group together avl_left,avl_right,v4daddr to speedup lookups */ /* group together avl_left,avl_right,v4daddr to speedup lookups */
struct inet_peer *avl_left, *avl_right; struct inet_peer *avl_left, *avl_right;
__be32 v4daddr; /* peer's address */ __be32 v4daddr; /* peer's address */
......
...@@ -33,8 +33,7 @@ ...@@ -33,8 +33,7 @@
struct sock; struct sock;
struct inet_skb_parm struct inet_skb_parm {
{
struct ip_options opt; /* Compiled IP options */ struct ip_options opt; /* Compiled IP options */
unsigned char flags; unsigned char flags;
...@@ -50,8 +49,7 @@ static inline unsigned int ip_hdrlen(const struct sk_buff *skb) ...@@ -50,8 +49,7 @@ static inline unsigned int ip_hdrlen(const struct sk_buff *skb)
return ip_hdr(skb)->ihl * 4; return ip_hdr(skb)->ihl * 4;
} }
struct ipcm_cookie struct ipcm_cookie {
{
__be32 addr; __be32 addr;
int oif; int oif;
struct ip_options *opt; struct ip_options *opt;
...@@ -60,8 +58,7 @@ struct ipcm_cookie ...@@ -60,8 +58,7 @@ struct ipcm_cookie
#define IPCB(skb) ((struct inet_skb_parm*)((skb)->cb)) #define IPCB(skb) ((struct inet_skb_parm*)((skb)->cb))
struct ip_ra_chain struct ip_ra_chain {
{
struct ip_ra_chain *next; struct ip_ra_chain *next;
struct sock *sk; struct sock *sk;
void (*destructor)(struct sock *); void (*destructor)(struct sock *);
...@@ -159,8 +156,7 @@ static inline __u8 ip_reply_arg_flowi_flags(const struct ip_reply_arg *arg) ...@@ -159,8 +156,7 @@ static inline __u8 ip_reply_arg_flowi_flags(const struct ip_reply_arg *arg)
void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg, void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg,
unsigned int len); unsigned int len);
struct ipv4_config struct ipv4_config {
{
int log_martians; int log_martians;
int no_pmtu_disc; int no_pmtu_disc;
}; };
...@@ -336,8 +332,7 @@ extern int ip_call_ra_chain(struct sk_buff *skb); ...@@ -336,8 +332,7 @@ extern int ip_call_ra_chain(struct sk_buff *skb);
* Functions provided by ip_fragment.c * Functions provided by ip_fragment.c
*/ */
enum ip_defrag_users enum ip_defrag_users {
{
IP_DEFRAG_LOCAL_DELIVER, IP_DEFRAG_LOCAL_DELIVER,
IP_DEFRAG_CALL_RA_CHAIN, IP_DEFRAG_CALL_RA_CHAIN,
IP_DEFRAG_CONNTRACK_IN, IP_DEFRAG_CONNTRACK_IN,
......
...@@ -30,8 +30,7 @@ ...@@ -30,8 +30,7 @@
struct rt6_info; struct rt6_info;
struct fib6_config struct fib6_config {
{
u32 fc_table; u32 fc_table;
u32 fc_metric; u32 fc_metric;
int fc_dst_len; int fc_dst_len;
...@@ -51,8 +50,7 @@ struct fib6_config ...@@ -51,8 +50,7 @@ struct fib6_config
struct nl_info fc_nlinfo; struct nl_info fc_nlinfo;
}; };
struct fib6_node struct fib6_node {
{
struct fib6_node *parent; struct fib6_node *parent;
struct fib6_node *left; struct fib6_node *left;
struct fib6_node *right; struct fib6_node *right;
...@@ -78,16 +76,14 @@ struct fib6_node ...@@ -78,16 +76,14 @@ struct fib6_node
* *
*/ */
struct rt6key struct rt6key {
{
struct in6_addr addr; struct in6_addr addr;
int plen; int plen;
}; };
struct fib6_table; struct fib6_table;
struct rt6_info struct rt6_info {
{
union { union {
struct dst_entry dst; struct dst_entry dst;
} u; } u;
...@@ -127,8 +123,7 @@ static inline struct inet6_dev *ip6_dst_idev(struct dst_entry *dst) ...@@ -127,8 +123,7 @@ static inline struct inet6_dev *ip6_dst_idev(struct dst_entry *dst)
return ((struct rt6_info *)dst)->rt6i_idev; return ((struct rt6_info *)dst)->rt6i_idev;
} }
struct fib6_walker_t struct fib6_walker_t {
{
struct fib6_walker_t *prev, *next; struct fib6_walker_t *prev, *next;
struct fib6_node *root, *node; struct fib6_node *root, *node;
struct rt6_info *leaf; struct rt6_info *leaf;
......
...@@ -103,8 +103,7 @@ extern void rt6_pmtu_discovery(struct in6_addr *daddr, ...@@ -103,8 +103,7 @@ extern void rt6_pmtu_discovery(struct in6_addr *daddr,
struct netlink_callback; struct netlink_callback;
struct rt6_rtnl_dump_arg struct rt6_rtnl_dump_arg {
{
struct sk_buff *skb; struct sk_buff *skb;
struct netlink_callback *cb; struct netlink_callback *cb;
struct net *net; struct net *net;
......
...@@ -251,8 +251,7 @@ struct ip_vs_estimator { ...@@ -251,8 +251,7 @@ struct ip_vs_estimator {
u32 outbps; u32 outbps;
}; };
struct ip_vs_stats struct ip_vs_stats {
{
struct ip_vs_stats_user ustats; /* statistics */ struct ip_vs_stats_user ustats; /* statistics */
struct ip_vs_estimator est; /* estimator */ struct ip_vs_estimator est; /* estimator */
...@@ -518,8 +517,7 @@ struct ip_vs_scheduler { ...@@ -518,8 +517,7 @@ struct ip_vs_scheduler {
/* /*
* The application module object (a.k.a. app incarnation) * The application module object (a.k.a. app incarnation)
*/ */
struct ip_vs_app struct ip_vs_app {
{
struct list_head a_list; /* member in app list */ struct list_head a_list; /* member in app list */
int type; /* IP_VS_APP_TYPE_xxx */ int type; /* IP_VS_APP_TYPE_xxx */
char *name; /* application module name */ char *name; /* application module name */
......
...@@ -8,16 +8,14 @@ ...@@ -8,16 +8,14 @@
#define IPTUNNEL_ERR_TIMEO (30*HZ) #define IPTUNNEL_ERR_TIMEO (30*HZ)
/* 6rd prefix/relay information */ /* 6rd prefix/relay information */
struct ip_tunnel_6rd_parm struct ip_tunnel_6rd_parm {
{
struct in6_addr prefix; struct in6_addr prefix;
__be32 relay_prefix; __be32 relay_prefix;
u16 prefixlen; u16 prefixlen;