aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/mcast_user.c
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-05-06 17:51:02 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-07 15:13:00 -0400
commit56bd194bb200ef0c49517de67a7d7f4b043b11b1 (patch)
tree2c180ee0e18e0e18b997a8a14d84505f0388f1c7 /arch/um/drivers/mcast_user.c
parentb47d2debf229469c78af4145ee7ad35a0f21b67f (diff)
uml: driver formatting fixes
Fix a bunch of formatting violations in the drivers: return(n) -> return n whitespace fixes emacs formatting comment removal breaking if(foo) return(n) into two lines There are also a couple of errno use bugs: using errno in a printk when the failure put errno into a local variable saving errno after a printk, which can change it Signed-off-by: Jeff Dike <jdike@linux.intel.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/drivers/mcast_user.c')
-rw-r--r--arch/um/drivers/mcast_user.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/um/drivers/mcast_user.c b/arch/um/drivers/mcast_user.c
index b827e82884c9..cfaa2cc43139 100644
--- a/arch/um/drivers/mcast_user.c
+++ b/arch/um/drivers/mcast_user.c
@@ -34,12 +34,12 @@ static struct sockaddr_in *new_addr(char *addr, unsigned short port)
34 sin = um_kmalloc(sizeof(struct sockaddr_in)); 34 sin = um_kmalloc(sizeof(struct sockaddr_in));
35 if(sin == NULL){ 35 if(sin == NULL){
36 printk("new_addr: allocation of sockaddr_in failed\n"); 36 printk("new_addr: allocation of sockaddr_in failed\n");
37 return(NULL); 37 return NULL;
38 } 38 }
39 sin->sin_family = AF_INET; 39 sin->sin_family = AF_INET;
40 sin->sin_addr.s_addr = in_aton(addr); 40 sin->sin_addr.s_addr = in_aton(addr);
41 sin->sin_port = htons(port); 41 sin->sin_port = htons(port);
42 return(sin); 42 return sin;
43} 43}
44 44
45static void mcast_user_init(void *data, void *dev) 45static void mcast_user_init(void *data, void *dev)
@@ -107,8 +107,8 @@ static int mcast_open(void *data)
107 err = -errno; 107 err = -errno;
108 printk("mcast_open : data bind failed, errno = %d\n", errno); 108 printk("mcast_open : data bind failed, errno = %d\n", errno);
109 goto out_close; 109 goto out_close;
110 } 110 }
111 111
112 /* subscribe to the multicast group */ 112 /* subscribe to the multicast group */
113 mreq.imr_multiaddr.s_addr = sin->sin_addr.s_addr; 113 mreq.imr_multiaddr.s_addr = sin->sin_addr.s_addr;
114 mreq.imr_interface.s_addr = 0; 114 mreq.imr_interface.s_addr = 0;
@@ -153,12 +153,12 @@ int mcast_user_write(int fd, void *buf, int len, struct mcast_data *pri)
153{ 153{
154 struct sockaddr_in *data_addr = pri->mcast_addr; 154 struct sockaddr_in *data_addr = pri->mcast_addr;
155 155
156 return(net_sendto(fd, buf, len, data_addr, sizeof(*data_addr))); 156 return net_sendto(fd, buf, len, data_addr, sizeof(*data_addr));
157} 157}
158 158
159static int mcast_set_mtu(int mtu, void *data) 159static int mcast_set_mtu(int mtu, void *data)
160{ 160{
161 return(mtu); 161 return mtu;
162} 162}
163 163
164const struct net_user_info mcast_user_info = { 164const struct net_user_info mcast_user_info = {