From b10aeeef554eb1ff80e10111829f6e7484877811 Mon Sep 17 00:00:00 2001 From: Jeff Dike Date: Fri, 29 Sep 2006 01:58:50 -0700 Subject: [PATCH] uml: mechanical tidying after random MACs change Mechanical, hopefully non-functional changes stemming from setup_etheraddr always succeeding now that it always assigns a MAC, either from the command line or generated randomly: the test of the return of setup_etheraddr is removed, and code dependent on it succeeding is now unconditional setup_etheraddr can now be made void struct uml_net.have_mac is now always 1, so tests of it can be similarly removed, and uses of it can be replaced with 1 struct uml_net.have_mac is no longer used, so it can be removed struct uml_net_private.have_mac is copied from struct uml_net, so it is always 1 tests of uml_net_private.have_mac can be removed uml_net_private.have_mac can now be removed the only call to dev_ip_addr was removed, so it can be deleted It also turns out that setup_etheraddr is called only once, from the same file, so it can be static and its declaration removed from net_kern.h. Similarly, set_ether_mac is defined and called only from one file. Finally, setup_etheraddr and set_ether_mac were moved to avoid needing forward declarations. Signed-off-by: Jeff Dike Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- arch/um/include/net_kern.h | 14 -------------- arch/um/include/net_user.h | 1 - 2 files changed, 15 deletions(-) (limited to 'arch/um/include') diff --git a/arch/um/include/net_kern.h b/arch/um/include/net_kern.h index 769fba43ee0..280459fb0b2 100644 --- a/arch/um/include/net_kern.h +++ b/arch/um/include/net_kern.h @@ -18,7 +18,6 @@ struct uml_net { struct platform_device pdev; int index; unsigned char mac[ETH_ALEN]; - int have_mac; }; struct uml_net_private { @@ -29,7 +28,6 @@ struct uml_net_private { struct net_device_stats stats; int fd; unsigned char mac[ETH_ALEN]; - int have_mac; unsigned short (*protocol)(struct sk_buff *); int (*open)(void *); void (*close)(int, void *); @@ -62,7 +60,6 @@ struct transport { extern struct net_device *ether_init(int); extern unsigned short ether_protocol(struct sk_buff *); -extern int setup_etheraddr(char *str, unsigned char *addr); extern struct sk_buff *ether_adjust_skb(struct sk_buff *skb, int extra); extern int tap_setup_common(char *str, char *type, char **dev_name, char **mac_out, char **gate_addr); @@ -70,14 +67,3 @@ extern void register_transport(struct transport *new); extern unsigned short eth_protocol(struct sk_buff *skb); #endif - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ diff --git a/arch/um/include/net_user.h b/arch/um/include/net_user.h index cd19defbfef..99b3cea2dcd 100644 --- a/arch/um/include/net_user.h +++ b/arch/um/include/net_user.h @@ -25,7 +25,6 @@ struct net_user_info { }; extern void ether_user_init(void *data, void *dev); -extern void dev_ip_addr(void *d, unsigned char *bin_buf); extern void iter_addresses(void *d, void (*cb)(unsigned char *, unsigned char *, void *), void *arg); -- cgit v1.2.3