From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnaldo Carvalho de Melo Subject: [PATCH] linux/net.h: bye bye struct net_proto Date: Thu, 3 Apr 2003 11:40:03 -0300 Sender: netdev-bounce@oss.sgi.com Message-ID: <20030403144003.GA17155@conectiva.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Linux Networking Development Mailing List Return-path: To: "David S. Miller" Content-Disposition: inline Errors-to: netdev-bounce@oss.sgi.com List-Id: netdev.vger.kernel.org Hi David, Please consider pulling from: bk://kernel.bkbits.net/acme/net-2.5 Still the same tree, not yet updated to linus's. - Arnaldo You can import this changeset into BK by piping this whole message to: '| bk receive [path to repository]' or apply the patch as usual. =================================================================== ChangeSet@1.1003, 2003-04-03 11:08:27-03:00, acme@conectiva.com.br o linux/net.h: bye bye struct net_proto struct net_proto is not anymore needed, as the protocols have their init functions marked as __init, not needing explicit calling. include/linux/atm.h | 11 ----------- include/linux/if_pppox.h | 2 -- include/linux/inet.h | 7 +------ include/linux/net.h | 10 ---------- include/net/af_unix.h | 1 - net/atm/common.c | 3 +-- net/atm/pvc.c | 7 +++---- net/atm/svc.c | 7 +++---- net/ipv4/af_inet.c | 2 +- net/unix/af_unix.c | 5 ++--- 10 files changed, 11 insertions(+), 44 deletions(-) diff -Nru a/include/linux/atm.h b/include/linux/atm.h --- a/include/linux/atm.h Thu Apr 3 11:23:28 2003 +++ b/include/linux/atm.h Thu Apr 3 11:23:28 2003 @@ -236,15 +236,4 @@ }; typedef unsigned short atm_backend_t; - -#ifdef __KERNEL__ - -#include /* struct net_proto */ - - -void atmpvc_proto_init(struct net_proto *pro); -void atmsvc_proto_init(struct net_proto *pro); - -#endif /* __KERNEL__ */ - #endif diff -Nru a/include/linux/if_pppox.h b/include/linux/if_pppox.h --- a/include/linux/if_pppox.h Thu Apr 3 11:23:28 2003 +++ b/include/linux/if_pppox.h Thu Apr 3 11:23:28 2003 @@ -158,8 +158,6 @@ extern struct ppp_channel_ops pppoe_chan_ops; -extern int pppox_proto_init(struct net_proto *np); - #endif /* __KERNEL__ */ #endif /* !(__LINUX_IF_PPPOX_H) */ diff -Nru a/include/linux/inet.h b/include/linux/inet.h --- a/include/linux/inet.h Thu Apr 3 11:23:28 2003 +++ b/include/linux/inet.h Thu Apr 3 11:23:28 2003 @@ -43,11 +43,6 @@ #define _LINUX_INET_H #ifdef __KERNEL__ - -#include - -extern void inet_proto_init(struct net_proto *pro); -extern __u32 in_aton(const char *str); - +extern __u32 in_aton(const char *str); #endif #endif /* _LINUX_INET_H */ diff -Nru a/include/linux/net.h b/include/linux/net.h --- a/include/linux/net.h Thu Apr 3 11:23:28 2003 +++ b/include/linux/net.h Thu Apr 3 11:23:28 2003 @@ -136,16 +136,6 @@ short encrypt_net; }; -/** - * struct socket - network interface with the file system - * @name - Protocol name - * @init_func - Bootstrap - */ -struct net_proto { - const char *name; - void (*init_func)(struct net_proto *pro); -}; - extern int sock_wake_async(struct socket *sk, int how, int band); extern int sock_register(struct net_proto_family *fam); extern int sock_unregister(int family); diff -Nru a/include/net/af_unix.h b/include/net/af_unix.h --- a/include/net/af_unix.h Thu Apr 3 11:23:28 2003 +++ b/include/net/af_unix.h Thu Apr 3 11:23:28 2003 @@ -1,6 +1,5 @@ #ifndef __LINUX_NET_AFUNIX_H #define __LINUX_NET_AFUNIX_H -extern void unix_proto_init(struct net_proto *pro); extern void unix_inflight(struct file *fp); extern void unix_notinflight(struct file *fp); typedef struct sock unix_socket; diff -Nru a/net/atm/common.c b/net/atm/common.c --- a/net/atm/common.c Thu Apr 3 11:23:28 2003 +++ b/net/atm/common.c Thu Apr 3 11:23:28 2003 @@ -6,8 +6,7 @@ #include #include #include -#include /* struct socket, struct net_proto, struct - proto_ops */ +#include /* struct socket, struct proto_ops */ #include /* ATM stuff */ #include #include /* CLIP_*ENCAP */ diff -Nru a/net/atm/pvc.c b/net/atm/pvc.c --- a/net/atm/pvc.c Thu Apr 3 11:23:28 2003 +++ b/net/atm/pvc.c Thu Apr 3 11:23:28 2003 @@ -4,8 +4,7 @@ #include -#include /* struct socket, struct net_proto, - struct proto_ops */ +#include /* struct socket, struct proto_ops */ #include /* ATM stuff */ #include /* ATM devices */ #include /* Classical IP over ATM */ @@ -111,8 +110,8 @@ static struct net_proto_family pvc_family_ops = { - .family =PF_ATMPVC, - .create =pvc_create, + .family = PF_ATMPVC, + .create = pvc_create, }; diff -Nru a/net/atm/svc.c b/net/atm/svc.c --- a/net/atm/svc.c Thu Apr 3 11:23:28 2003 +++ b/net/atm/svc.c Thu Apr 3 11:23:28 2003 @@ -4,8 +4,7 @@ #include -#include /* struct socket, struct net_proto, - struct proto_ops */ +#include /* struct socket, struct proto_ops */ #include /* error codes */ #include /* printk */ #include @@ -430,8 +429,8 @@ static struct net_proto_family svc_family_ops = { - .family =PF_ATMSVC, - .create =svc_create, + .family = PF_ATMSVC, + .create = svc_create, }; diff -Nru a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c --- a/net/ipv4/af_inet.c Thu Apr 3 11:23:28 2003 +++ b/net/ipv4/af_inet.c Thu Apr 3 11:23:28 2003 @@ -1122,7 +1122,7 @@ printk(KERN_INFO "NET4: Linux TCP/IP 1.0 for NET4.0\n"); if (sizeof(struct inet_skb_parm) > sizeof(dummy_skb->cb)) { - printk(KERN_CRIT "inet_proto_init: panic\n"); + printk(KERN_CRIT "%s: panic\n", __FUNCTION__); return -EINVAL; } diff -Nru a/net/unix/af_unix.c b/net/unix/af_unix.c --- a/net/unix/af_unix.c Thu Apr 3 11:23:28 2003 +++ b/net/unix/af_unix.c Thu Apr 3 11:23:28 2003 @@ -1945,9 +1945,8 @@ struct sk_buff *dummy_skb; printk(banner); - if (sizeof(struct unix_skb_parms) > sizeof(dummy_skb->cb)) - { - printk(KERN_CRIT "unix_proto_init: panic\n"); + if (sizeof(struct unix_skb_parms) > sizeof(dummy_skb->cb)) { + printk(KERN_CRIT "%s: panic\n", __FUNCTION__); return -1; } /* allocate our sock slab cache */ =================================================================== This BitKeeper patch contains the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