summaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/slip_kern.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-10-16 01:27:29 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 09:43:08 -0700
commitcd1ae0e49bdd814cfaa2e5ab28cff21a30e20085 (patch)
tree1b993b9de4cb9a8578022a4014063c3e87ec996e /arch/um/drivers/slip_kern.c
parent1a80521990a0e30e61a92994a009adc52161b070 (diff)
downloadlinux-cd1ae0e49bdd814cfaa2e5ab28cff21a30e20085.tar.gz
linux-cd1ae0e49bdd814cfaa2e5ab28cff21a30e20085.tar.bz2
linux-cd1ae0e49bdd814cfaa2e5ab28cff21a30e20085.zip
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.c34
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 @@
-#include "linux/kernel.h"
-#include "linux/stddef.h"
-#include "linux/init.h"
-#include "linux/netdevice.h"
-#include "linux/if_arp.h"
+/*
+ * Copyright (C) 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
+ * Licensed under the GPL.
+ */
+
+#include <linux/if_arp.h>
+#include <linux/init.h>
+#include <linux/netdevice.h>
#include "net_kern.h"
-#include "net_user.h"
-#include "kern.h"
#include "slip.h"
struct slip_init {
@@ -43,21 +44,21 @@ void slip_init(struct net_device *dev, void *data)
static unsigned short slip_protocol(struct sk_buff *skbuff)
{
- return(htons(ETH_P_IP));
+ return htons(ETH_P_IP);
}
-static int slip_read(int fd, struct sk_buff **skb,
+static int slip_read(int fd, struct sk_buff **skb,
struct uml_net_private *lp)
{
- return(slip_user_read(fd, skb_mac_header(*skb), (*skb)->dev->mtu,
- (struct slip_data *) &lp->user));
+ return slip_user_read(fd, skb_mac_header(*skb), (*skb)->dev->mtu,
+ (struct slip_data *) &lp->user);
}
static int slip_write(int fd, struct sk_buff **skb,
struct uml_net_private *lp)
{
- return(slip_user_write(fd, (*skb)->data, (*skb)->len,
- (struct slip_data *) &lp->user));
+ return slip_user_write(fd, (*skb)->data, (*skb)->len,
+ (struct slip_data *) &lp->user);
}
const struct net_kern_info slip_kern_info = {
@@ -71,12 +72,11 @@ static int slip_setup(char *str, char **mac_out, void *data)
{
struct slip_init *init = data;
- *init = ((struct slip_init)
- { .gate_addr = NULL });
+ *init = ((struct slip_init) { .gate_addr = NULL });
- if(str[0] != '\0')
+ if (str[0] != '\0')
init->gate_addr = str;
- return(1);
+ return 1;
}
static struct transport slip_transport = {