Skip to content

Commit

Permalink
net: cleanup include/net
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Eric Dumazet authored and davem330 committed Nov 4, 2009
1 parent 4b7673a commit fd2c3ef
Show file tree
Hide file tree
Showing 37 changed files with 120 additions and 240 deletions.
3 changes: 1 addition & 2 deletions include/net/ah.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@

struct crypto_ahash;

struct ah_data
{
struct ah_data {
int icv_full_len;
int icv_trunc_len;

Expand Down
12 changes: 4 additions & 8 deletions include/net/dn_dev.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,14 @@ struct dn_dev {
unsigned long uptime; /* Time device went up in jiffies */
};

struct dn_short_packet
{
struct dn_short_packet {
__u8 msgflg;
__le16 dstnode;
__le16 srcnode;
__u8 forward;
} __attribute__((packed));

struct dn_long_packet
{
struct dn_long_packet {
__u8 msgflg;
__u8 d_area;
__u8 d_subarea;
Expand All @@ -122,8 +120,7 @@ struct dn_long_packet

/*------------------------- DRP - Routing messages ---------------------*/

struct endnode_hello_message
{
struct endnode_hello_message {
__u8 msgflg;
__u8 tiver[3];
__u8 id[6];
Expand All @@ -138,8 +135,7 @@ struct endnode_hello_message
__u8 data[2];
} __attribute__((packed));

struct rtnode_hello_message
{
struct rtnode_hello_message {
__u8 msgflg;
__u8 tiver[3];
__u8 id[6];
Expand Down
3 changes: 1 addition & 2 deletions include/net/dn_fib.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
/* WARNING: The ordering of these elements must match ordering
* of RTA_* rtnetlink attribute numbers.
*/
struct dn_kern_rta
{
struct dn_kern_rta {
void *rta_dst;
void *rta_src;
int *rta_iif;
Expand Down
24 changes: 8 additions & 16 deletions include/net/dn_nsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,47 +70,41 @@ extern struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int nobl

/* Data Messages (data segment/interrupt/link service) */

struct nsp_data_seg_msg
{
struct nsp_data_seg_msg {
__u8 msgflg;
__le16 dstaddr;
__le16 srcaddr;
} __attribute__((packed));

struct nsp_data_opt_msg
{
struct nsp_data_opt_msg {
__le16 acknum;
__le16 segnum;
__le16 lsflgs;
} __attribute__((packed));

struct nsp_data_opt_msg1
{
struct nsp_data_opt_msg1 {
__le16 acknum;
__le16 segnum;
} __attribute__((packed));


/* Acknowledgment Message (data/other data) */
struct nsp_data_ack_msg
{
struct nsp_data_ack_msg {
__u8 msgflg;
__le16 dstaddr;
__le16 srcaddr;
__le16 acknum;
} __attribute__((packed));

/* Connect Acknowledgment Message */
struct nsp_conn_ack_msg
{
struct nsp_conn_ack_msg {
__u8 msgflg;
__le16 dstaddr;
} __attribute__((packed));


/* Connect Initiate/Retransmit Initiate/Connect Confirm */
struct nsp_conn_init_msg
{
struct nsp_conn_init_msg {
__u8 msgflg;
#define NSP_CI 0x18 /* Connect Initiate */
#define NSP_RCI 0x68 /* Retrans. Conn Init */
Expand All @@ -126,8 +120,7 @@ struct nsp_conn_init_msg
} __attribute__((packed));

/* Disconnect Initiate/Disconnect Confirm */
struct nsp_disconn_init_msg
{
struct nsp_disconn_init_msg {
__u8 msgflg;
__le16 dstaddr;
__le16 srcaddr;
Expand All @@ -136,8 +129,7 @@ struct nsp_disconn_init_msg



struct srcobj_fmt
{
struct srcobj_fmt {
__u8 format;
__u8 task;
__le16 grpcode;
Expand Down
3 changes: 1 addition & 2 deletions include/net/dst.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@

struct sk_buff;

struct dst_entry
{
struct dst_entry {
struct rcu_head rcu_head;
struct dst_entry *child;
struct net_device *dev;
Expand Down
9 changes: 3 additions & 6 deletions include/net/fib_rules.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
#include <net/flow.h>
#include <net/rtnetlink.h>

struct fib_rule
{
struct fib_rule {
struct list_head list;
atomic_t refcnt;
int ifindex;
Expand All @@ -25,15 +24,13 @@ struct fib_rule
struct net * fr_net;
};

struct fib_lookup_arg
{
struct fib_lookup_arg {
void *lookup_ptr;
void *result;
struct fib_rule *rule;
};

struct fib_rules_ops
{
struct fib_rules_ops {
int family;
struct list_head list;
int rule_size;
Expand Down
3 changes: 1 addition & 2 deletions include/net/gen_stats.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
#include <linux/rtnetlink.h>
#include <linux/pkt_sched.h>

struct gnet_dump
{
struct gnet_dump {
spinlock_t * lock;
struct sk_buff * skb;
struct nlattr * tail;
Expand Down
12 changes: 4 additions & 8 deletions include/net/genetlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
* @list: list entry for linking
* @family: pointer to family, need not be set before registering
*/
struct genl_multicast_group
{
struct genl_multicast_group {
struct genl_family *family; /* private */
struct list_head list; /* private */
char name[GENL_NAMSIZ];
Expand All @@ -35,8 +34,7 @@ struct genl_multicast_group
* @family_list: family list
* @mcast_groups: multicast groups list
*/
struct genl_family
{
struct genl_family {
unsigned int id;
unsigned int hdrsize;
char name[GENL_NAMSIZ];
Expand All @@ -58,8 +56,7 @@ struct genl_family
* @userhdr: user specific header
* @attrs: netlink attributes
*/
struct genl_info
{
struct genl_info {
u32 snd_seq;
u32 snd_pid;
struct nlmsghdr * nlhdr;
Expand Down Expand Up @@ -102,8 +99,7 @@ static inline void genl_info_net_set(struct genl_info *info, struct net *net)
* @done: completion callback for dumps
* @ops_list: operations list
*/
struct genl_ops
{
struct genl_ops {
u8 cmd;
unsigned int flags;
const struct nla_policy *policy;
Expand Down
24 changes: 8 additions & 16 deletions include/net/if_inet6.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@

#ifdef __KERNEL__

struct inet6_ifaddr
{
struct inet6_ifaddr {
struct in6_addr addr;
__u32 prefix_len;

Expand Down Expand Up @@ -67,8 +66,7 @@ struct inet6_ifaddr
int dead;
};

struct ip6_sf_socklist
{
struct ip6_sf_socklist {
unsigned int sl_max;
unsigned int sl_count;
struct in6_addr sl_addr[0];
Expand All @@ -79,8 +77,7 @@ struct ip6_sf_socklist

#define IP6_SFBLOCK 10 /* allocate this many at once */

struct ipv6_mc_socklist
{
struct ipv6_mc_socklist {
struct in6_addr addr;
int ifindex;
struct ipv6_mc_socklist *next;
Expand All @@ -89,8 +86,7 @@ struct ipv6_mc_socklist
struct ip6_sf_socklist *sflist;
};

struct ip6_sf_list
{
struct ip6_sf_list {
struct ip6_sf_list *sf_next;
struct in6_addr sf_addr;
unsigned long sf_count[2]; /* include/exclude counts */
Expand All @@ -105,8 +101,7 @@ struct ip6_sf_list
#define MAF_NOREPORT 0x08
#define MAF_GSQUERY 0x10

struct ifmcaddr6
{
struct ifmcaddr6 {
struct in6_addr mca_addr;
struct inet6_dev *idev;
struct ifmcaddr6 *next;
Expand All @@ -126,15 +121,13 @@ struct ifmcaddr6

/* Anycast stuff */

struct ipv6_ac_socklist
{
struct ipv6_ac_socklist {
struct in6_addr acl_addr;
int acl_ifindex;
struct ipv6_ac_socklist *acl_next;
};

struct ifacaddr6
{
struct ifacaddr6 {
struct in6_addr aca_addr;
struct inet6_dev *aca_idev;
struct rt6_info *aca_rt;
Expand All @@ -157,8 +150,7 @@ struct ipv6_devstat {
DEFINE_SNMP_STAT(struct icmpv6msg_mib, icmpv6msg);
};

struct inet6_dev
{
struct inet6_dev {
struct net_device *dev;

struct inet6_ifaddr *addr_list;
Expand Down
3 changes: 1 addition & 2 deletions include/net/inetpeer.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
#include <linux/spinlock.h>
#include <asm/atomic.h>

struct inet_peer
{
struct inet_peer {
/* group together avl_left,avl_right,v4daddr to speedup lookups */
struct inet_peer *avl_left, *avl_right;
__be32 v4daddr; /* peer's address */
Expand Down
15 changes: 5 additions & 10 deletions include/net/ip.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@

struct sock;

struct inet_skb_parm
{
struct inet_skb_parm {
struct ip_options opt; /* Compiled IP options */
unsigned char flags;

Expand All @@ -50,8 +49,7 @@ static inline unsigned int ip_hdrlen(const struct sk_buff *skb)
return ip_hdr(skb)->ihl * 4;
}

struct ipcm_cookie
{
struct ipcm_cookie {
__be32 addr;
int oif;
struct ip_options *opt;
Expand All @@ -60,8 +58,7 @@ struct ipcm_cookie

#define IPCB(skb) ((struct inet_skb_parm*)((skb)->cb))

struct ip_ra_chain
{
struct ip_ra_chain {
struct ip_ra_chain *next;
struct sock *sk;
void (*destructor)(struct sock *);
Expand Down Expand Up @@ -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,
unsigned int len);

struct ipv4_config
{
struct ipv4_config {
int log_martians;
int no_pmtu_disc;
};
Expand Down Expand Up @@ -336,8 +332,7 @@ extern int ip_call_ra_chain(struct sk_buff *skb);
* Functions provided by ip_fragment.c
*/

enum ip_defrag_users
{
enum ip_defrag_users {
IP_DEFRAG_LOCAL_DELIVER,
IP_DEFRAG_CALL_RA_CHAIN,
IP_DEFRAG_CONNTRACK_IN,
Expand Down
Loading

0 comments on commit fd2c3ef

Please sign in to comment.