diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2016-01-02 00:17:56 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-01-02 00:21:19 +0100 |
commit | 23eed95fd74ff95cc5050d081b285431bdf2324d (patch) | |
tree | 9483dcb6b0a5740bb36a50665223f38b31eb4f1e /linux/src/include/net | |
parent | d449859ec8e33055036a5a7bb15bfe4f68282391 (diff) |
replace extern with static in some linux code
* linux/dev/include/linux/fs.h: Replace extern with static.
* linux/dev/include/linux/locks.h: Likewise.
* linux/dev/include/linux/mm.h: Likewise.
* linux/src/drivers/net/e2100.c: Likewise
* linux/src/include/asm-i386/termios.h: Likewise.
* linux/src/include/linux/interrupt.h: Likewise.
* linux/src/include/net/route.h: Likewise.
* linux/src/include/net/sock.h: Likewise.
Diffstat (limited to 'linux/src/include/net')
-rw-r--r-- | linux/src/include/net/route.h | 16 | ||||
-rw-r--r-- | linux/src/include/net/sock.h | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/linux/src/include/net/route.h b/linux/src/include/net/route.h index 7bf32d0..2af1a41 100644 --- a/linux/src/include/net/route.h +++ b/linux/src/include/net/route.h @@ -105,30 +105,30 @@ extern unsigned ip_rt_bh_mask; extern struct rtable *ip_rt_hash_table[RT_HASH_DIVISOR]; extern void rt_free(struct rtable * rt); -extern __inline__ void ip_rt_fast_lock(void) +static __inline__ void ip_rt_fast_lock(void) { atomic_inc(&ip_rt_lock); } -extern __inline__ void ip_rt_fast_unlock(void) +static __inline__ void ip_rt_fast_unlock(void) { atomic_dec(&ip_rt_lock); } -extern __inline__ void ip_rt_unlock(void) +static __inline__ void ip_rt_unlock(void) { if (atomic_dec_and_test(&ip_rt_lock) && ip_rt_bh_mask) ip_rt_run_bh(); } -extern __inline__ unsigned ip_rt_hash_code(__u32 addr) +static __inline__ unsigned ip_rt_hash_code(__u32 addr) { unsigned tmp = addr + (addr>>16); return (tmp + (tmp>>8)) & 0xFF; } -extern __inline__ void ip_rt_put(struct rtable * rt) +static __inline__ void ip_rt_put(struct rtable * rt) #ifndef MODULE { /* If this rtable entry is not in the cache, we'd better free @@ -142,9 +142,9 @@ extern __inline__ void ip_rt_put(struct rtable * rt) #endif #ifdef CONFIG_KERNELD -extern struct rtable * ip_rt_route(__u32 daddr, int local, struct device *dev); +static struct rtable * ip_rt_route(__u32 daddr, int local, struct device *dev); #else -extern __inline__ struct rtable * ip_rt_route(__u32 daddr, int local, struct device *dev) +static __inline__ struct rtable * ip_rt_route(__u32 daddr, int local, struct device *dev) #ifndef MODULE { struct rtable * rth; @@ -170,7 +170,7 @@ extern __inline__ struct rtable * ip_rt_route(__u32 daddr, int local, struct dev #endif #endif -extern __inline__ struct rtable * ip_check_route(struct rtable ** rp, __u32 daddr, +static __inline__ struct rtable * ip_check_route(struct rtable ** rp, __u32 daddr, int local, struct device *dev) { struct rtable * rt = *rp; diff --git a/linux/src/include/net/sock.h b/linux/src/include/net/sock.h index 7a3ec03..25a9044 100644 --- a/linux/src/include/net/sock.h +++ b/linux/src/include/net/sock.h @@ -559,7 +559,7 @@ extern struct sk_buff *sock_alloc_send_skb(struct sock *skb, * packet ever received. */ -extern __inline__ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) +static __inline__ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) { if (sk->rmem_alloc + skb->truesize >= sk->rcvbuf) return -ENOMEM; @@ -571,7 +571,7 @@ extern __inline__ int sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) return 0; } -extern __inline__ int __sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) +static __inline__ int __sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) { if (sk->rmem_alloc + skb->truesize >= sk->rcvbuf) return -ENOMEM; @@ -587,7 +587,7 @@ extern __inline__ int __sock_queue_rcv_skb(struct sock *sk, struct sk_buff *skb) * Recover an error report and clear atomically */ -extern __inline__ int sock_error(struct sock *sk) +static __inline__ int sock_error(struct sock *sk) { int err=xchg(&sk->err,0); return -err; |