net/core/: misc possible cleanups
Subsystems (6)
PATCH 1/1 net/core/: misc possible cleanups
The patch below contains the following possible cleanups:
- make needlessly global code static
- remove the following unused global functions:
- datagram.c: skb_copy_datagram
- iovec.c: memcpy_tokerneliovec
- skbuff.c: skb_insert
- skbuff.c: skb_iter_first
- skbuff.c: skb_iter_next
- skbuff.c: skb_iter_abort
- remove the following unneeded EXPORT_SYMBOL's:
- datagram.c: skb_copy_datagram
- dev.c: ing_filter
- iovec.c: memcpy_tokerneliovec
- netpoll.c: netpoll_send_skb
- rtnetlink.c: rtnetlink_dump_ifinfo
- skbuff.c: skb_insert
- skbuff.c: skb_iter_first
- skbuff.c: skb_iter_next
- skbuff.c: skb_iter_abort
- sock.c: sock_alloc_send_pskb
Please comment on which of these changes are correct and which conflict with pending patches.
diffstat output:
include/linux/netdevice.h | 1 include/linux/netfilter.h | 4 - include/linux/netpoll.h | 1 include/linux/rtnetlink.h | 1 include/linux/skbuff.h | 12 ----- include/linux/socket.h | 1 include/net/iw_handler.h | 3 - include/net/pkt_cls.h | 1 include/net/sock.h | 7 --- net/core/datagram.c | 19 +------- net/core/dev.c | 13 +---- net/core/dst.c | 2 net/core/iovec.c | 23 ---------- net/core/netfilter.c | 2 net/core/netpoll.c | 5 -- net/core/rtnetlink.c | 3 - net/core/skbuff.c | 87 -------------------------------------- net/core/sock.c | 17 +++---- net/core/wireless.c | 2 19 files changed, 22 insertions(+), 182 deletions(-)
include/linux/skbuff.h renamed from include/linux/skbuff.h.old +0 -12
@@ -594,7 +594,6 @@/* * Insert a packet on a list. */ -extern void skb_insert (struct sk_buff *old,struct sk_buff *newsk);static inline void __skb_insert (struct sk_buff *newsk,struct sk_buff *prev,struct sk_buff *next,struct sk_buff_head *list)
@@ -1086,14 +1085,9 @@ int noblock, int *err);extern unsigned int datagram_poll (struct file *file,struct socket *sock,struct poll_table_struct *wait); -extern int skb_copy_datagram (const struct sk_buff *from, -int offset,char __user *to,int size);extern int skb_copy_datagram_iovec (const struct sk_buff *from,int offset,struct iovec *to,int size); -extern int skb_copy_and_csum_datagram (const struct sk_buff *skb, -int offset,u8 __user *to, -int len,unsigned int *csump); extern int skb_copy_and_csum_datagram_iovec(const struct sk_buff *skb, int hlen,
@@ -1137,12 +1131,6 @@struct sk_buff *fraglist; }; -/* Keep iterating until skb_iter_next returns false. */ -extern void skb_iter_first (const struct sk_buff *skb,struct skb_iter *i); -extern int skb_iter_next (const struct sk_buff *skb,struct skb_iter *i); -/* Call this if aborting loop before !skb_iter_next */ -extern void skb_iter_abort (const struct sk_buff *skb,struct skb_iter *i); -#ifdef CONFIG_NETFILTER static inline void nf_conntrack_put (struct nf_conntrack *nfct) {
include/net/pkt_cls.h renamed from include/net/pkt_cls.h.old +0 -1
@@ -17,7 +17,6 @@extern int register_tcf_proto_ops (struct tcf_proto_ops *ops);extern int unregister_tcf_proto_ops (struct tcf_proto_ops *ops); -extern int ing_filter (struct sk_buff *skb);static inline unsigned long __cls_set_class (unsigned long *clp,unsigned long cl)
include/linux/netdevice.h renamed from include/linux/netdevice.h.old +0 -1
@@ -522,7 +522,6 @@extern struct net_device *dev_base;/* All devices */ extern rwlock_t dev_base_lock;/* Device list lock */ -extern int netdev_boot_setup_add (char *name,struct ifmap *map);extern int netdev_boot_setup_check (struct net_device *dev);extern unsigned long netdev_boot_base (const char *prefix,int unit);extern struct net_device *dev_getbyhwaddr (unsigned short type,char *hwaddr);
include/linux/socket.h renamed from include/linux/socket.h.old +0 -1
@@ -286,7 +286,6 @@extern int verify_iovec (struct msghdr *m,struct iovec *iov,char *address,int mode);extern int memcpy_toiovec (struct iovec *v,unsigned char *kdata,int len); -extern void memcpy_tokerneliovec (struct iovec *iov,unsigned char *kdata,int len);extern int move_addr_to_user (void *kaddr,int klen,void __user *uaddr,int __user *ulen);extern int move_addr_to_kernel (void __user *uaddr,int ulen,void *kaddr);extern int put_cmsg (struct msghdr *,int level,int type,int len,void *data);
include/linux/netfilter.h renamed from include/linux/netfilter.h.old +0 -4
@@ -175,10 +175,6 @@extern void (*ip_ct_attach)(struct sk_buff *,struct sk_buff *);extern void nf_ct_attach (struct sk_buff *,struct sk_buff *); -#ifdef CONFIG_NETFILTER_DEBUG -extern void nf_dump_skb (int pf,struct sk_buff *skb); -#endif -/* FIXME: Before cache is ever used, this must be implemented for real. */ extern void nf_invalidate_cache (int pf);
net/core/datagram.c renamed from net/core/datagram.c.old +3 -16
@@ -199,19 +199,6 @@kfree_skb (skb); } -/* -* Copy a datagram to a linear buffer. -*/ -int skb_copy_datagram (const struct sk_buff *skb,int offset,char __user *to,int size) -{ -struct iovec iov = { - .iov_base = to, - .iov_len =size, - }; - -return skb_copy_datagram_iovec (skb, offset, &iov, size); -} -/** * skb_copy_datagram_iovec - Copy a datagram to an iovec. * @skb - buffer to copy
@@ -296,8 +283,9 @@return -EFAULT ; } -int skb_copy_and_csum_datagram (const struct sk_buff *skb,int offset, -u8 __user *to,int len,unsigned int *csump) +static int skb_copy_and_csum_datagram (const struct sk_buff *skb,int offset, +u8 __user *to,int len, +unsigned int *csump) {int start =skb_headlen (skb);int pos =0 ;
@@ -489,7 +477,6 @@EXPORT_SYMBOL (datagram_poll);EXPORT_SYMBOL (skb_copy_and_csum_datagram_iovec); -EXPORT_SYMBOL (skb_copy_datagram);EXPORT_SYMBOL (skb_copy_datagram_iovec);EXPORT_SYMBOL (skb_free_datagram);EXPORT_SYMBOL (skb_recv_datagram);
net/core/dev.c renamed from net/core/dev.c.old +4 -9
@@ -183,7 +183,7 @@* semaphore held. */ struct net_device *dev_base; -struct net_device **dev_tail = &dev_base; +static struct net_device **dev_tail = &dev_base;rwlock_t dev_base_lock =RW_LOCK_UNLOCKED ;EXPORT_SYMBOL (dev_base);
@@ -361,7 +361,7 @@* returns 0 on error and 1 on success. This is a generic routine to * all netdevices. */ -int netdev_boot_setup_add (char *name,struct ifmap *map) +static int netdev_boot_setup_add (char *name,struct ifmap *map) {struct netdev_boot_setup *s;int i;
@@ -644,7 +644,7 @@* Network device names need to be valid file names to * to allow sysfs to work */ -int dev_valid_name (const char *name) +static int dev_valid_name (const char *name) {return !(*name =='\0' || !strcmp(name, ".")
@@ -1596,7 +1596,7 @@* the ingress scheduler, you just cant add policies on ingress. * */ -int ing_filter (struct sk_buff *skb) +static int ing_filter (struct sk_buff *skb) {struct Qdisc *q;struct net_device *dev = skb->dev;
@@ -3251,9 +3251,4 @@EXPORT_SYMBOL (dev_load);#endif -#ifdef CONFIG_NET_CLS_ACT -EXPORT_SYMBOL (ing_filter); -#endif - -EXPORT_PER_CPU_SYMBOL (softnet_data);
net/core/dst.c renamed from net/core/dst.c.old +1 -1
@@ -264,7 +264,7 @@return NOTIFY_DONE ; } -struct notifier_block dst_dev_notifier = { +static struct notifier_block dst_dev_notifier = { .notifier_call = dst_dev_event, };
net/core/iovec.c renamed from net/core/iovec.c.old +0 -23
@@ -99,28 +99,6 @@ }/* -* In kernel copy to iovec. Returns -EFAULT on error. -* -* Note: this modifies the original iovec. -*/ - -void memcpy_tokerneliovec (struct iovec *iov,unsigned char *kdata,int len) -{ -while (len >0 ) { -if (iov->iov_len) { - int copy = min_t(unsigned int, iov->iov_len, len); -memcpy (iov->iov_base, kdata, copy); - kdata += copy; - len -= copy; - iov->iov_len -= copy; - iov->iov_base += copy; - } - iov++; - } -} - - -/* * Copy iovec to kernel. Returns -EFAULT on error. * * Note: this modifies the original iovec.
@@ -259,4 +237,3 @@EXPORT_SYMBOL (memcpy_fromiovec);EXPORT_SYMBOL (memcpy_fromiovecend);EXPORT_SYMBOL (memcpy_toiovec); -EXPORT_SYMBOL (memcpy_tokerneliovec);
net/core/netfilter.c renamed from net/core/netfilter.c.old +1 -1
@@ -173,7 +173,7 @@printk ("\n" ); } -void nf_dump_skb (int pf,struct sk_buff *skb) +static void nf_dump_skb (int pf,struct sk_buff *skb) { printk("skb: pf=%i %s dev=%s len=%u\n", pf,
include/linux/netpoll.h renamed from include/linux/netpoll.h.old +0 -1
@@ -24,7 +24,6 @@ };void netpoll_poll (struct netpoll *np); -void netpoll_send_skb (struct netpoll *np,struct sk_buff *skb);void netpoll_send_udp (struct netpoll *np,const char *msg,int len);int netpoll_parse_options (struct netpoll *np,char *opt);int netpoll_setup (struct netpoll *np);
net/core/netpoll.c renamed from net/core/netpoll.c.old +2 -3
@@ -39,7 +39,7 @@static LIST_HEAD (rx_list);static atomic_t trapped; -spinlock_t netpoll_poll_lock =SPIN_LOCK_UNLOCKED ; +static spinlock_t netpoll_poll_lock =SPIN_LOCK_UNLOCKED ;#define NETPOLL_RX_ENABLED 1#define NETPOLL_RX_DROP 2
@@ -178,7 +178,7 @@return skb; } -void netpoll_send_skb (struct netpoll *np,struct sk_buff *skb) +static void netpoll_send_skb (struct netpoll *np,struct sk_buff *skb) {int status;
@@ -676,6 +676,5 @@EXPORT_SYMBOL (netpoll_parse_options);EXPORT_SYMBOL (netpoll_setup);EXPORT_SYMBOL (netpoll_cleanup); -EXPORT_SYMBOL (netpoll_send_skb);EXPORT_SYMBOL (netpoll_send_udp);EXPORT_SYMBOL (netpoll_poll);
include/linux/rtnetlink.h renamed from include/linux/rtnetlink.h.old +0 -1
@@ -765,7 +765,6 @@ };extern struct rtnetlink_link * rtnetlink_links[NPROTO ]; -extern int rtnetlink_dump_ifinfo (struct sk_buff *skb,struct netlink_callback *cb);extern int rtnetlink_send (struct sk_buff *skb,u32 pid,u32 group,int echo);extern int rtnetlink_put_metrics (struct sk_buff *skb,u32 *metrics);
net/core/rtnetlink.c renamed from net/core/rtnetlink.c.old +1 -2
@@ -241,7 +241,7 @@return -1 ; } -int rtnetlink_dump_ifinfo (struct sk_buff *skb,struct netlink_callback *cb) +static int rtnetlink_dump_ifinfo (struct sk_buff *skb,struct netlink_callback *cb) {int idx;int s_idx = cb->args[0 ];
@@ -676,7 +676,6 @@EXPORT_SYMBOL (__rta_fill);EXPORT_SYMBOL (rtattr_parse); -EXPORT_SYMBOL (rtnetlink_dump_ifinfo);EXPORT_SYMBOL (rtnetlink_links);EXPORT_SYMBOL (rtnetlink_put_metrics);EXPORT_SYMBOL (rtnl);
net/core/skbuff.c renamed from net/core/skbuff.c.old +0 -87
108 lines not on this page · raw message
include/net/sock.h renamed from include/net/sock.h.old +0 -7
@@ -733,11 +733,6 @@unsigned long size, int noblock, int *errcode); -extern struct sk_buff *sock_alloc_send_pskb (struct sock *sk, -unsigned long header_len, -unsigned long data_len, -int noblock, -int *errcode);extern void *sock_kmalloc (struct sock *sk,int size,int priority);extern void sock_kfree_s (struct sock *sk,void *mem,int size);extern void sk_send_sigurg (struct sock *sk);
@@ -795,8 +790,6 @@* Default socket callbacks and setup code */ -extern void sock_def_destruct (struct sock *); -/* Initialise core socket variables */ extern void sock_init_data (struct socket *sock,struct sock *sk);
net/core/sock.c renamed from net/core/sock.c.old +9 -8
@@ -825,8 +825,10 @@* Generic send/receive buffer handlers */ -struct sk_buff *sock_alloc_send_pskb (struct sock *sk,unsigned long header_len, -unsigned long data_len,int noblock,int *errcode) +static struct sk_buff *sock_alloc_send_pskb (struct sock *sk, +unsigned long header_len, +unsigned long data_len, +int noblock,int *errcode) {struct sk_buff *skb;unsigned int gfp_mask;
@@ -1084,7 +1086,7 @@* Default Socket Callbacks */ -void sock_def_wakeup (struct sock *sk) +static void sock_def_wakeup (struct sock *sk) {read_lock (&sk->sk_callback_lock);if (sk->sk_sleep &&waitqueue_active (sk->sk_sleep))
@@ -1092,7 +1094,7 @@read_unlock (&sk->sk_callback_lock); } -void sock_def_error_report (struct sock *sk) +static void sock_def_error_report (struct sock *sk) {read_lock (&sk->sk_callback_lock);if (sk->sk_sleep &&waitqueue_active (sk->sk_sleep))
@@ -1101,7 +1103,7 @@read_unlock (&sk->sk_callback_lock); } -void sock_def_readable (struct sock *sk,int len) +static void sock_def_readable (struct sock *sk,int len) {read_lock (&sk->sk_callback_lock);if (sk->sk_sleep &&waitqueue_active (sk->sk_sleep))
@@ -1110,7 +1112,7 @@read_unlock (&sk->sk_callback_lock); } -void sock_def_write_space (struct sock *sk) +static void sock_def_write_space (struct sock *sk) {read_lock (&sk->sk_callback_lock);
@@ -1129,7 +1131,7 @@read_unlock (&sk->sk_callback_lock); } -void sock_def_destruct (struct sock *sk) +static void sock_def_destruct (struct sock *sk) {if (sk->sk_protinfo)kfree (sk->sk_protinfo);
@@ -1368,7 +1370,6 @@EXPORT_SYMBOL (sk_alloc);EXPORT_SYMBOL (sk_free);EXPORT_SYMBOL (sk_send_sigurg); -EXPORT_SYMBOL (sock_alloc_send_pskb);EXPORT_SYMBOL (sock_alloc_send_skb);EXPORT_SYMBOL (sock_init_data);EXPORT_SYMBOL (sock_kfree_s);
include/net/iw_handler.h renamed from include/net/iw_handler.h.old +0 -3
@@ -418,9 +418,6 @@* Those may be called only within the kernel. */ -/* Data needed by fs/compat_ioctl.c for 32->64 bit conversion */ -extern const char iw_priv_type_size[]; -/* First : function strictly used inside the kernel */ /* Handle /proc/net/wireless, called in net/code/dev.c */
net/core/wireless.c renamed from net/core/wireless.c.old +1 -1
@@ -304,7 +304,7 @@ sizeof(struct iw_ioctl_description));/* Size (in bytes) of the various private data types */ -const char iw_priv_type_size[] = { +static const char iw_priv_type_size[] = {0 ,/* IW_PRIV_TYPE_NONE */ 1 ,/* IW_PRIV_TYPE_BYTE */ 1 ,/* IW_PRIV_TYPE_CHAR */
David S. Miller
maintainerQuoted 4 lines · On Tue, 14 Dec 2004 05:57:58 +0100 Adrian Bunk <[email protected]> wrote:
-
skbuff.c:skb_insert
-skbuff.c:skb_iter_first
-skbuff.c:skb_iter_next
-skbuff.c:skb_iter_abort
These are actually planned to be used, let's keep them in for now.
PATCH 1/1 net/core/: misc possible cleanups
Quoted 10 lines · David S. Miller
Quoted 4 lines · On Tue, 14 Dec 2004 05:57:58 +0100 Adrian Bunk <[email protected]> wrote:
-
skbuff.c:skb_insert
-skbuff.c:skb_iter_first
-skbuff.c:skb_iter_next
-skbuff.c:skb_iter_abortThese are actually planned to be used, let's keep them in for now.
OK, updated patch:
<-- snip -->
The patch below contains the following cleanups:
- make needlessly global code static
- remove the following unused global functions:
- datagram.c: skb_copy_datagram
- iovec.c: memcpy_tokerneliovec
- remove the following unneeded EXPORT_SYMBOL's:
- datagram.c: skb_copy_datagram
- dev.c: ing_filter
- iovec.c: memcpy_tokerneliovec
- netpoll.c: netpoll_send_skb
- rtnetlink.c: rtnetlink_dump_ifinfo
- sock.c: sock_alloc_send_pskb
diffstat output:
include/linux/netdevice.h | 1 - include/linux/netfilter.h | 4 ---- include/linux/netpoll.h | 1 - include/linux/rtnetlink.h | 1 - include/linux/skbuff.h | 5 ----- include/linux/socket.h | 1 - include/net/iw_handler.h | 3 --- include/net/pkt_cls.h | 1 - include/net/sock.h | 7 ------- net/core/datagram.c | 19 +++---------------- net/core/dev.c | 13 ++++--------- net/core/dst.c | 2 +- net/core/iovec.c | 23 ----------------------- net/core/netfilter.c | 2 +- net/core/netpoll.c | 5 ++--- net/core/rtnetlink.c | 3 +-- net/core/sock.c | 17 +++++++++-------- net/core/wireless.c | 3 +-- 18 files changed, 22 insertions(+), 89 deletions(-)
include/linux/skbuff.h renamed from include/linux/skbuff.h.old +0 -5
@@ -1086,14 +1085,9 @@ int noblock, int *err);extern unsigned int datagram_poll (struct file *file,struct socket *sock,struct poll_table_struct *wait); -extern int skb_copy_datagram (const struct sk_buff *from, -int offset,char __user *to,int size);extern int skb_copy_datagram_iovec (const struct sk_buff *from,int offset,struct iovec *to,int size); -extern int skb_copy_and_csum_datagram (const struct sk_buff *skb, -int offset,u8 __user *to, -int len,unsigned int *csump); extern int skb_copy_and_csum_datagram_iovec(const struct sk_buff *skb, int hlen,
include/net/pkt_cls.h renamed from include/net/pkt_cls.h.old +0 -1
@@ -17,7 +17,6 @@extern int register_tcf_proto_ops (struct tcf_proto_ops *ops);extern int unregister_tcf_proto_ops (struct tcf_proto_ops *ops); -extern int ing_filter (struct sk_buff *skb);static inline unsigned long __cls_set_class (unsigned long *clp,unsigned long cl)
include/linux/netdevice.h renamed from include/linux/netdevice.h.old +0 -1
@@ -522,7 +522,6 @@extern struct net_device *dev_base;/* All devices */ extern rwlock_t dev_base_lock;/* Device list lock */ -extern int netdev_boot_setup_add (char *name,struct ifmap *map);extern int netdev_boot_setup_check (struct net_device *dev);extern unsigned long netdev_boot_base (const char *prefix,int unit);extern struct net_device *dev_getbyhwaddr (unsigned short type,char *hwaddr);
include/linux/socket.h renamed from include/linux/socket.h.old +0 -1
@@ -286,7 +286,6 @@extern int verify_iovec (struct msghdr *m,struct iovec *iov,char *address,int mode);extern int memcpy_toiovec (struct iovec *v,unsigned char *kdata,int len); -extern void memcpy_tokerneliovec (struct iovec *iov,unsigned char *kdata,int len);extern int move_addr_to_user (void *kaddr,int klen,void __user *uaddr,int __user *ulen);extern int move_addr_to_kernel (void __user *uaddr,int ulen,void *kaddr);extern int put_cmsg (struct msghdr *,int level,int type,int len,void *data);
include/linux/netfilter.h renamed from include/linux/netfilter.h.old +0 -4
@@ -175,10 +175,6 @@extern void (*ip_ct_attach)(struct sk_buff *,struct sk_buff *);extern void nf_ct_attach (struct sk_buff *,struct sk_buff *); -#ifdef CONFIG_NETFILTER_DEBUG -extern void nf_dump_skb (int pf,struct sk_buff *skb); -#endif -/* FIXME: Before cache is ever used, this must be implemented for real. */ extern void nf_invalidate_cache (int pf);
net/core/datagram.c renamed from net/core/datagram.c.old +3 -16
@@ -199,19 +199,6 @@kfree_skb (skb); } -/* -* Copy a datagram to a linear buffer. -*/ -int skb_copy_datagram (const struct sk_buff *skb,int offset,char __user *to,int size) -{ -struct iovec iov = { - .iov_base = to, - .iov_len =size, - }; - -return skb_copy_datagram_iovec (skb, offset, &iov, size); -} -/** * skb_copy_datagram_iovec - Copy a datagram to an iovec. * @skb - buffer to copy
@@ -296,8 +283,9 @@return -EFAULT ; } -int skb_copy_and_csum_datagram (const struct sk_buff *skb,int offset, -u8 __user *to,int len,unsigned int *csump) +static int skb_copy_and_csum_datagram (const struct sk_buff *skb,int offset, +u8 __user *to,int len, +unsigned int *csump) {int start =skb_headlen (skb);int pos =0 ;
@@ -489,7 +477,6 @@EXPORT_SYMBOL (datagram_poll);EXPORT_SYMBOL (skb_copy_and_csum_datagram_iovec); -EXPORT_SYMBOL (skb_copy_datagram);EXPORT_SYMBOL (skb_copy_datagram_iovec);EXPORT_SYMBOL (skb_free_datagram);EXPORT_SYMBOL (skb_recv_datagram);
net/core/dev.c renamed from net/core/dev.c.old +4 -9
@@ -183,7 +183,7 @@* semaphore held. */ struct net_device *dev_base; -struct net_device **dev_tail = &dev_base; +static struct net_device **dev_tail = &dev_base;rwlock_t dev_base_lock =RW_LOCK_UNLOCKED ;EXPORT_SYMBOL (dev_base);
@@ -361,7 +361,7 @@* returns 0 on error and 1 on success. This is a generic routine to * all netdevices. */ -int netdev_boot_setup_add (char *name,struct ifmap *map) +static int netdev_boot_setup_add (char *name,struct ifmap *map) {struct netdev_boot_setup *s;int i;
@@ -644,7 +644,7 @@* Network device names need to be valid file names to * to allow sysfs to work */ -int dev_valid_name (const char *name) +static int dev_valid_name (const char *name) {return !(*name =='\0' || !strcmp(name, ".")
@@ -1596,7 +1596,7 @@* the ingress scheduler, you just cant add policies on ingress. * */ -int ing_filter (struct sk_buff *skb) +static int ing_filter (struct sk_buff *skb) {struct Qdisc *q;struct net_device *dev = skb->dev;
@@ -3251,9 +3251,4 @@EXPORT_SYMBOL (dev_load);#endif -#ifdef CONFIG_NET_CLS_ACT -EXPORT_SYMBOL (ing_filter); -#endif - -EXPORT_PER_CPU_SYMBOL (softnet_data);
net/core/dst.c renamed from net/core/dst.c.old +1 -1
@@ -264,7 +264,7 @@return NOTIFY_DONE ; } -struct notifier_block dst_dev_notifier = { +static struct notifier_block dst_dev_notifier = { .notifier_call = dst_dev_event, };
net/core/iovec.c renamed from net/core/iovec.c.old +0 -23
@@ -99,28 +99,6 @@ }/* -* In kernel copy to iovec. Returns -EFAULT on error. -* -* Note: this modifies the original iovec. -*/ - -void memcpy_tokerneliovec (struct iovec *iov,unsigned char *kdata,int len) -{ -while (len >0 ) { -if (iov->iov_len) { - int copy = min_t(unsigned int, iov->iov_len, len); -memcpy (iov->iov_base, kdata, copy); - kdata += copy; - len -= copy; - iov->iov_len -= copy; - iov->iov_base += copy; - } - iov++; - } -} - - -/* * Copy iovec to kernel. Returns -EFAULT on error. * * Note: this modifies the original iovec.
@@ -259,4 +237,3 @@EXPORT_SYMBOL (memcpy_fromiovec);EXPORT_SYMBOL (memcpy_fromiovecend);EXPORT_SYMBOL (memcpy_toiovec); -EXPORT_SYMBOL (memcpy_tokerneliovec);
net/core/netfilter.c renamed from net/core/netfilter.c.old +1 -1
@@ -173,7 +173,7 @@printk ("\n" ); } -void nf_dump_skb (int pf,struct sk_buff *skb) +static void nf_dump_skb (int pf,struct sk_buff *skb) { printk("skb: pf=%i %s dev=%s len=%u\n", pf,
include/linux/netpoll.h renamed from include/linux/netpoll.h.old +0 -1
@@ -24,7 +24,6 @@ };void netpoll_poll (struct netpoll *np); -void netpoll_send_skb (struct netpoll *np,struct sk_buff *skb);void netpoll_send_udp (struct netpoll *np,const char *msg,int len);int netpoll_parse_options (struct netpoll *np,char *opt);int netpoll_setup (struct netpoll *np);
net/core/netpoll.c renamed from net/core/netpoll.c.old +2 -3
@@ -39,7 +39,7 @@static LIST_HEAD (rx_list);static atomic_t trapped; -spinlock_t netpoll_poll_lock =SPIN_LOCK_UNLOCKED ; +static spinlock_t netpoll_poll_lock =SPIN_LOCK_UNLOCKED ;#define NETPOLL_RX_ENABLED 1#define NETPOLL_RX_DROP 2
@@ -178,7 +178,7 @@return skb; } -void netpoll_send_skb (struct netpoll *np,struct sk_buff *skb) +static void netpoll_send_skb (struct netpoll *np,struct sk_buff *skb) {int status;
@@ -676,6 +676,5 @@EXPORT_SYMBOL (netpoll_parse_options);EXPORT_SYMBOL (netpoll_setup);EXPORT_SYMBOL (netpoll_cleanup); -EXPORT_SYMBOL (netpoll_send_skb);EXPORT_SYMBOL (netpoll_send_udp);EXPORT_SYMBOL (netpoll_poll);
include/linux/rtnetlink.h renamed from include/linux/rtnetlink.h.old +0 -1
@@ -765,7 +765,6 @@ };extern struct rtnetlink_link * rtnetlink_links[NPROTO ]; -extern int rtnetlink_dump_ifinfo (struct sk_buff *skb,struct netlink_callback *cb);extern int rtnetlink_send (struct sk_buff *skb,u32 pid,u32 group,int echo);extern int rtnetlink_put_metrics (struct sk_buff *skb,u32 *metrics);
net/core/rtnetlink.c renamed from net/core/rtnetlink.c.old +1 -2
@@ -241,7 +241,7 @@return -1 ; } -int rtnetlink_dump_ifinfo (struct sk_buff *skb,struct netlink_callback *cb) +static int rtnetlink_dump_ifinfo (struct sk_buff *skb,struct netlink_callback *cb) {int idx;int s_idx = cb->args[0 ];
@@ -676,7 +676,6 @@EXPORT_SYMBOL (__rta_fill);EXPORT_SYMBOL (rtattr_parse); -EXPORT_SYMBOL (rtnetlink_dump_ifinfo);EXPORT_SYMBOL (rtnetlink_links);EXPORT_SYMBOL (rtnetlink_put_metrics);EXPORT_SYMBOL (rtnl);
include/net/sock.h renamed from include/net/sock.h.old +0 -7
@@ -733,11 +733,6 @@unsigned long size, int noblock, int *errcode); -extern struct sk_buff *sock_alloc_send_pskb (struct sock *sk, -unsigned long header_len, -unsigned long data_len, -int noblock, -int *errcode);extern void *sock_kmalloc (struct sock *sk,int size,int priority);extern void sock_kfree_s (struct sock *sk,void *mem,int size);extern void sk_send_sigurg (struct sock *sk);
@@ -795,8 +790,6 @@* Default socket callbacks and setup code */ -extern void sock_def_destruct (struct sock *); -/* Initialise core socket variables */ extern void sock_init_data (struct socket *sock,struct sock *sk);
net/core/sock.c renamed from net/core/sock.c.old +9 -8
@@ -825,8 +825,10 @@* Generic send/receive buffer handlers */ -struct sk_buff *sock_alloc_send_pskb (struct sock *sk,unsigned long header_len, -unsigned long data_len,int noblock,int *errcode) +static struct sk_buff *sock_alloc_send_pskb (struct sock *sk, +unsigned long header_len, +unsigned long data_len, +int noblock,int *errcode) {struct sk_buff *skb;unsigned int gfp_mask;
@@ -1084,7 +1086,7 @@* Default Socket Callbacks */ -void sock_def_wakeup (struct sock *sk) +static void sock_def_wakeup (struct sock *sk) {read_lock (&sk->sk_callback_lock);if (sk->sk_sleep &&waitqueue_active (sk->sk_sleep))
@@ -1092,7 +1094,7 @@read_unlock (&sk->sk_callback_lock); } -void sock_def_error_report (struct sock *sk) +static void sock_def_error_report (struct sock *sk) {read_lock (&sk->sk_callback_lock);if (sk->sk_sleep &&waitqueue_active (sk->sk_sleep))
@@ -1101,7 +1103,7 @@read_unlock (&sk->sk_callback_lock); } -void sock_def_readable (struct sock *sk,int len) +static void sock_def_readable (struct sock *sk,int len) {read_lock (&sk->sk_callback_lock);if (sk->sk_sleep &&waitqueue_active (sk->sk_sleep))
@@ -1110,7 +1112,7 @@read_unlock (&sk->sk_callback_lock); } -void sock_def_write_space (struct sock *sk) +static void sock_def_write_space (struct sock *sk) {read_lock (&sk->sk_callback_lock);
@@ -1129,7 +1131,7 @@read_unlock (&sk->sk_callback_lock); } -void sock_def_destruct (struct sock *sk) +static void sock_def_destruct (struct sock *sk) {if (sk->sk_protinfo)kfree (sk->sk_protinfo);
@@ -1368,7 +1370,6 @@EXPORT_SYMBOL (sk_alloc);EXPORT_SYMBOL (sk_free);EXPORT_SYMBOL (sk_send_sigurg); -EXPORT_SYMBOL (sock_alloc_send_pskb);EXPORT_SYMBOL (sock_alloc_send_skb);EXPORT_SYMBOL (sock_init_data);EXPORT_SYMBOL (sock_kfree_s);
include/net/iw_handler.h renamed from include/net/iw_handler.h.old +0 -3
@@ -418,9 +418,6 @@* Those may be called only within the kernel. */ -/* Data needed by fs/compat_ioctl.c for 32->64 bit conversion */ -extern const char iw_priv_type_size[]; -/* First : function strictly used inside the kernel */ /* Handle /proc/net/wireless, called in net/code/dev.c */
net/core/wireless.c renamed from net/core/wireless.c.old +1 -1
@@ -304,7 +304,7 @@ sizeof(struct iw_ioctl_description));/* Size (in bytes) of the various private data types */ -const char iw_priv_type_size[] = { +static const char iw_priv_type_size[] = {0 ,/* IW_PRIV_TYPE_NONE */ 1 ,/* IW_PRIV_TYPE_BYTE */ 1 ,/* IW_PRIV_TYPE_CHAR */
Quoted 1 line · On Tue, 4 Jan 2005 00:51:27 +0100 Adrian Bunk <[email protected]> wrote:
OK, updated patch:
...
Quoted 1 line
Signed-off-by Adrian Bunk <[email protected]>
Applied, thanks Adrian.