diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-02-10 04:43:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 13:51:21 -0500 |
commit | 4ea21cd9173a0ffa75dc74cc46d08dfc45654f29 (patch) | |
tree | 904783bcd2a274005049c211bce2bd022275fe86 | |
parent | d3b7f69de2b92e4b6057d81e6c52f629a8663368 (diff) |
[PATCH] uml: network driver whitespace and style fixes
Some whitespace and coding style cleanups in the network driver code.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/um/drivers/net_kern.c | 29 | ||||
-rw-r--r-- | arch/um/include/net_kern.h | 6 |
2 files changed, 18 insertions, 17 deletions
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index b10154cc46b6..eede892a4f38 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
@@ -108,7 +108,7 @@ irqreturn_t uml_net_interrupt(int irq, void *dev_id) | |||
108 | 108 | ||
109 | out: | 109 | out: |
110 | spin_unlock(&lp->lock); | 110 | spin_unlock(&lp->lock); |
111 | return(IRQ_HANDLED); | 111 | return IRQ_HANDLED; |
112 | } | 112 | } |
113 | 113 | ||
114 | static int uml_net_open(struct net_device *dev) | 114 | static int uml_net_open(struct net_device *dev) |
@@ -239,7 +239,7 @@ static int uml_net_set_mac(struct net_device *dev, void *addr) | |||
239 | set_ether_mac(dev, hwaddr->sa_data); | 239 | set_ether_mac(dev, hwaddr->sa_data); |
240 | spin_unlock_irq(&lp->lock); | 240 | spin_unlock_irq(&lp->lock); |
241 | 241 | ||
242 | return(0); | 242 | return 0; |
243 | } | 243 | } |
244 | 244 | ||
245 | static int uml_net_change_mtu(struct net_device *dev, int new_mtu) | 245 | static int uml_net_change_mtu(struct net_device *dev, int new_mtu) |
@@ -460,7 +460,7 @@ static struct uml_net *find_device(int n) | |||
460 | device = NULL; | 460 | device = NULL; |
461 | out: | 461 | out: |
462 | spin_unlock(&devices_lock); | 462 | spin_unlock(&devices_lock); |
463 | return(device); | 463 | return device; |
464 | } | 464 | } |
465 | 465 | ||
466 | static int eth_parse(char *str, int *index_out, char **str_out, | 466 | static int eth_parse(char *str, int *index_out, char **str_out, |
@@ -511,23 +511,23 @@ static int check_transport(struct transport *transport, char *eth, int n, | |||
511 | 511 | ||
512 | len = strlen(transport->name); | 512 | len = strlen(transport->name); |
513 | if(strncmp(eth, transport->name, len)) | 513 | if(strncmp(eth, transport->name, len)) |
514 | return(0); | 514 | return 0; |
515 | 515 | ||
516 | eth += len; | 516 | eth += len; |
517 | if(*eth == ',') | 517 | if(*eth == ',') |
518 | eth++; | 518 | eth++; |
519 | else if(*eth != '\0') | 519 | else if(*eth != '\0') |
520 | return(0); | 520 | return 0; |
521 | 521 | ||
522 | *init_out = kmalloc(transport->setup_size, GFP_KERNEL); | 522 | *init_out = kmalloc(transport->setup_size, GFP_KERNEL); |
523 | if(*init_out == NULL) | 523 | if(*init_out == NULL) |
524 | return(1); | 524 | return 1; |
525 | 525 | ||
526 | if(!transport->setup(eth, mac_out, *init_out)){ | 526 | if(!transport->setup(eth, mac_out, *init_out)){ |
527 | kfree(*init_out); | 527 | kfree(*init_out); |
528 | *init_out = NULL; | 528 | *init_out = NULL; |
529 | } | 529 | } |
530 | return(1); | 530 | return 1; |
531 | } | 531 | } |
532 | 532 | ||
533 | void register_transport(struct transport *new) | 533 | void register_transport(struct transport *new) |
@@ -572,9 +572,9 @@ static int eth_setup_common(char *str, int index) | |||
572 | eth_configure(index, init, mac, transport); | 572 | eth_configure(index, init, mac, transport); |
573 | kfree(init); | 573 | kfree(init); |
574 | } | 574 | } |
575 | return(1); | 575 | return 1; |
576 | } | 576 | } |
577 | return(0); | 577 | return 0; |
578 | } | 578 | } |
579 | 579 | ||
580 | static int eth_setup(char *str) | 580 | static int eth_setup(char *str) |
@@ -678,7 +678,7 @@ static int net_remove(int n, char **error_out) | |||
678 | dev = device->dev; | 678 | dev = device->dev; |
679 | lp = dev->priv; | 679 | lp = dev->priv; |
680 | if(lp->fd > 0) | 680 | if(lp->fd > 0) |
681 | return -EBUSY; | 681 | return -EBUSY; |
682 | if(lp->remove != NULL) (*lp->remove)(&lp->user); | 682 | if(lp->remove != NULL) (*lp->remove)(&lp->user); |
683 | unregister_netdev(dev); | 683 | unregister_netdev(dev); |
684 | platform_device_unregister(&device->pdev); | 684 | platform_device_unregister(&device->pdev); |
@@ -693,7 +693,7 @@ static struct mc_device net_mc = { | |||
693 | .name = "eth", | 693 | .name = "eth", |
694 | .config = net_config, | 694 | .config = net_config, |
695 | .get_config = NULL, | 695 | .get_config = NULL, |
696 | .id = net_id, | 696 | .id = net_id, |
697 | .remove = net_remove, | 697 | .remove = net_remove, |
698 | }; | 698 | }; |
699 | 699 | ||
@@ -706,7 +706,8 @@ static int uml_inetaddr_event(struct notifier_block *this, unsigned long event, | |||
706 | void (*proc)(unsigned char *, unsigned char *, void *); | 706 | void (*proc)(unsigned char *, unsigned char *, void *); |
707 | unsigned char addr_buf[4], netmask_buf[4]; | 707 | unsigned char addr_buf[4], netmask_buf[4]; |
708 | 708 | ||
709 | if(dev->open != uml_net_open) return(NOTIFY_DONE); | 709 | if(dev->open != uml_net_open) |
710 | return NOTIFY_DONE; | ||
710 | 711 | ||
711 | lp = dev->priv; | 712 | lp = dev->priv; |
712 | 713 | ||
@@ -724,7 +725,7 @@ static int uml_inetaddr_event(struct notifier_block *this, unsigned long event, | |||
724 | memcpy(netmask_buf, &ifa->ifa_mask, sizeof(netmask_buf)); | 725 | memcpy(netmask_buf, &ifa->ifa_mask, sizeof(netmask_buf)); |
725 | (*proc)(addr_buf, netmask_buf, &lp->user); | 726 | (*proc)(addr_buf, netmask_buf, &lp->user); |
726 | } | 727 | } |
727 | return(NOTIFY_DONE); | 728 | return NOTIFY_DONE; |
728 | } | 729 | } |
729 | 730 | ||
730 | struct notifier_block uml_inetaddr_notifier = { | 731 | struct notifier_block uml_inetaddr_notifier = { |
@@ -834,7 +835,7 @@ void *get_output_buffer(int *len_out) | |||
834 | ret = (void *) __get_free_pages(GFP_KERNEL, 0); | 835 | ret = (void *) __get_free_pages(GFP_KERNEL, 0); |
835 | if(ret) *len_out = PAGE_SIZE; | 836 | if(ret) *len_out = PAGE_SIZE; |
836 | else *len_out = 0; | 837 | else *len_out = 0; |
837 | return(ret); | 838 | return ret; |
838 | } | 839 | } |
839 | 840 | ||
840 | void free_output_buffer(void *buffer) | 841 | void free_output_buffer(void *buffer) |
diff --git a/arch/um/include/net_kern.h b/arch/um/include/net_kern.h index 92f76d82a6ef..125ab42df18a 100644 --- a/arch/um/include/net_kern.h +++ b/arch/um/include/net_kern.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | 2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) |
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
@@ -36,7 +36,7 @@ struct uml_net_private { | |||
36 | void (*remove)(void *); | 36 | void (*remove)(void *); |
37 | int (*read)(int, struct sk_buff **skb, struct uml_net_private *); | 37 | int (*read)(int, struct sk_buff **skb, struct uml_net_private *); |
38 | int (*write)(int, struct sk_buff **skb, struct uml_net_private *); | 38 | int (*write)(int, struct sk_buff **skb, struct uml_net_private *); |
39 | 39 | ||
40 | void (*add_address)(unsigned char *, unsigned char *, void *); | 40 | void (*add_address)(unsigned char *, unsigned char *, void *); |
41 | void (*delete_address)(unsigned char *, unsigned char *, void *); | 41 | void (*delete_address)(unsigned char *, unsigned char *, void *); |
42 | int (*set_mtu)(int mtu, void *); | 42 | int (*set_mtu)(int mtu, void *); |
@@ -63,7 +63,7 @@ struct transport { | |||
63 | extern struct net_device *ether_init(int); | 63 | extern struct net_device *ether_init(int); |
64 | extern unsigned short ether_protocol(struct sk_buff *); | 64 | extern unsigned short ether_protocol(struct sk_buff *); |
65 | extern struct sk_buff *ether_adjust_skb(struct sk_buff *skb, int extra); | 65 | extern struct sk_buff *ether_adjust_skb(struct sk_buff *skb, int extra); |
66 | extern int tap_setup_common(char *str, char *type, char **dev_name, | 66 | extern int tap_setup_common(char *str, char *type, char **dev_name, |
67 | char **mac_out, char **gate_addr); | 67 | char **mac_out, char **gate_addr); |
68 | extern void register_transport(struct transport *new); | 68 | extern void register_transport(struct transport *new); |
69 | extern unsigned short eth_protocol(struct sk_buff *skb); | 69 | extern unsigned short eth_protocol(struct sk_buff *skb); |