diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-10-16 04:27:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:43:08 -0400 |
commit | cd1ae0e49bdd814cfaa2e5ab28cff21a30e20085 (patch) | |
tree | 1b993b9de4cb9a8578022a4014063c3e87ec996e /arch/um/drivers/slip_kern.c | |
parent | 1a80521990a0e30e61a92994a009adc52161b070 (diff) |
uml: network formatting
Style and other non-functional changes in the UML networking code, including
include tidying
style violations
copyright updates
printks getting severities
userspace code calling libc directly rather than using the os_*
wrappers
There's also a exit path cleanup in the pcap driver.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/drivers/slip_kern.c')
-rw-r--r-- | arch/um/drivers/slip_kern.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/arch/um/drivers/slip_kern.c b/arch/um/drivers/slip_kern.c index 125c44f77638..05ed351de6b5 100644 --- a/arch/um/drivers/slip_kern.c +++ b/arch/um/drivers/slip_kern.c | |||
@@ -1,11 +1,12 @@ | |||
1 | #include "linux/kernel.h" | 1 | /* |
2 | #include "linux/stddef.h" | 2 | * Copyright (C) 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) |
3 | #include "linux/init.h" | 3 | * Licensed under the GPL. |
4 | #include "linux/netdevice.h" | 4 | */ |
5 | #include "linux/if_arp.h" | 5 | |
6 | #include <linux/if_arp.h> | ||
7 | #include <linux/init.h> | ||
8 | #include <linux/netdevice.h> | ||
6 | #include "net_kern.h" | 9 | #include "net_kern.h" |
7 | #include "net_user.h" | ||
8 | #include "kern.h" | ||
9 | #include "slip.h" | 10 | #include "slip.h" |
10 | 11 | ||
11 | struct slip_init { | 12 | struct slip_init { |
@@ -43,21 +44,21 @@ void slip_init(struct net_device *dev, void *data) | |||
43 | 44 | ||
44 | static unsigned short slip_protocol(struct sk_buff *skbuff) | 45 | static unsigned short slip_protocol(struct sk_buff *skbuff) |
45 | { | 46 | { |
46 | return(htons(ETH_P_IP)); | 47 | return htons(ETH_P_IP); |
47 | } | 48 | } |
48 | 49 | ||
49 | static int slip_read(int fd, struct sk_buff **skb, | 50 | static int slip_read(int fd, struct sk_buff **skb, |
50 | struct uml_net_private *lp) | 51 | struct uml_net_private *lp) |
51 | { | 52 | { |
52 | return(slip_user_read(fd, skb_mac_header(*skb), (*skb)->dev->mtu, | 53 | return slip_user_read(fd, skb_mac_header(*skb), (*skb)->dev->mtu, |
53 | (struct slip_data *) &lp->user)); | 54 | (struct slip_data *) &lp->user); |
54 | } | 55 | } |
55 | 56 | ||
56 | static int slip_write(int fd, struct sk_buff **skb, | 57 | static int slip_write(int fd, struct sk_buff **skb, |
57 | struct uml_net_private *lp) | 58 | struct uml_net_private *lp) |
58 | { | 59 | { |
59 | return(slip_user_write(fd, (*skb)->data, (*skb)->len, | 60 | return slip_user_write(fd, (*skb)->data, (*skb)->len, |
60 | (struct slip_data *) &lp->user)); | 61 | (struct slip_data *) &lp->user); |
61 | } | 62 | } |
62 | 63 | ||
63 | const struct net_kern_info slip_kern_info = { | 64 | const struct net_kern_info slip_kern_info = { |
@@ -71,12 +72,11 @@ static int slip_setup(char *str, char **mac_out, void *data) | |||
71 | { | 72 | { |
72 | struct slip_init *init = data; | 73 | struct slip_init *init = data; |
73 | 74 | ||
74 | *init = ((struct slip_init) | 75 | *init = ((struct slip_init) { .gate_addr = NULL }); |
75 | { .gate_addr = NULL }); | ||
76 | 76 | ||
77 | if(str[0] != '\0') | 77 | if (str[0] != '\0') |
78 | init->gate_addr = str; | 78 | init->gate_addr = str; |
79 | return(1); | 79 | return 1; |
80 | } | 80 | } |
81 | 81 | ||
82 | static struct transport slip_transport = { | 82 | static struct transport slip_transport = { |