All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@stusta.de>
To: Andrew Morton <akpm@osdl.org>, davem@davemloft.net
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: [-mm patch] net/: possible cleanups
Date: Fri, 24 Nov 2006 22:58:20 +0100	[thread overview]
Message-ID: <20061124215820.GI28363@stusta.de> (raw)
In-Reply-To: <20061123021703.8550e37e.akpm@osdl.org>

On Thu, Nov 23, 2006 at 02:17:03AM -0800, Andrew Morton wrote:
>...
> Changes since 2.6.19-rc5-mm2:
>...
>  git-net.patch
>...
>  git trees
>...
 
This patch contains the following possible cleanups:
- make the following needlessly global functions statis:
  - ipv4/tcp.c: __tcp_alloc_md5sig_pool()
  - ipv4/tcp_ipv4.c: tcp_v4_reqsk_md5_lookup()
  - ipv4/udplite.c: udplite_rcv()
  - ipv4/udplite.c: udplite_err()
- make the following needlessly global structs static:
  - ipv4/tcp_ipv4.c: tcp_request_sock_ipv4_ops
  - ipv4/tcp_ipv4.c: tcp_sock_ipv4_specific
  - ipv6/tcp_ipv6.c: tcp_request_sock_ipv6_ops
- net/ipv{4,6}/udplite.c: remove inline's from static functions
                          (gcc should know best when to inline them)

Signed-off-by: Adrian Bunk <bunk@stusta.de>

---

 net/ipv4/tcp.c      |    2 +-
 net/ipv4/tcp_ipv4.c |    8 ++++----
 net/ipv4/udplite.c  |   10 +++++-----
 net/ipv6/tcp_ipv6.c |    2 +-
 net/ipv6/udplite.c  |   10 +++++-----
 5 files changed, 16 insertions(+), 16 deletions(-)

--- linux-2.6.19-rc6-mm1/net/ipv4/tcp.c.old	2006-11-24 01:30:11.000000000 +0100
+++ linux-2.6.19-rc6-mm1/net/ipv4/tcp.c	2006-11-24 01:31:21.000000000 +0100
@@ -2288,7 +2288,7 @@
 
 EXPORT_SYMBOL(tcp_free_md5sig_pool);
 
-struct tcp_md5sig_pool **__tcp_alloc_md5sig_pool(void)
+static struct tcp_md5sig_pool **__tcp_alloc_md5sig_pool(void)
 {
 	int cpu;
 	struct tcp_md5sig_pool **pool;
--- linux-2.6.19-rc6-mm1/net/ipv4/tcp_ipv4.c.old	2006-11-24 01:31:31.000000000 +0100
+++ linux-2.6.19-rc6-mm1/net/ipv4/tcp_ipv4.c	2006-11-24 01:33:00.000000000 +0100
@@ -841,8 +841,8 @@
 
 EXPORT_SYMBOL(tcp_v4_md5_lookup);
 
-struct tcp_md5sig_key *tcp_v4_reqsk_md5_lookup(struct sock *sk,
-					       struct request_sock *req)
+static struct tcp_md5sig_key *tcp_v4_reqsk_md5_lookup(struct sock *sk,
+						      struct request_sock *req)
 {
 	return tcp_v4_md5_do_lookup(sk, inet_rsk(req)->rmt_addr);
 }
@@ -1273,7 +1273,7 @@
 	.send_reset	=	tcp_v4_send_reset,
 };
 
-struct tcp_request_sock_ops tcp_request_sock_ipv4_ops = {
+static struct tcp_request_sock_ops tcp_request_sock_ipv4_ops = {
 #ifdef CONFIG_TCP_MD5SIG
 	.md5_lookup	=	tcp_v4_reqsk_md5_lookup,
 #endif
@@ -1861,7 +1861,7 @@
 #endif
 };
 
-struct tcp_sock_af_ops tcp_sock_ipv4_specific = {
+static struct tcp_sock_af_ops tcp_sock_ipv4_specific = {
 #ifdef CONFIG_TCP_MD5SIG
 	.md5_lookup		= tcp_v4_md5_lookup,
 	.calc_md5_hash		= tcp_v4_calc_md5_hash,
--- linux-2.6.19-rc6-mm1/net/ipv4/udplite.c.old	2006-11-24 01:33:19.000000000 +0100
+++ linux-2.6.19-rc6-mm1/net/ipv4/udplite.c	2006-11-24 01:34:07.000000000 +0100
@@ -18,23 +18,23 @@
 struct hlist_head 	udplite_hash[UDP_HTABLE_SIZE];
 static int		udplite_port_rover;
 
-__inline__ int udplite_get_port(struct sock *sk, unsigned short p,
-			int (*c)(const struct sock *, const struct sock *))
+int udplite_get_port(struct sock *sk, unsigned short p,
+		     int (*c)(const struct sock *, const struct sock *))
 {
 	return  __udp_lib_get_port(sk, p, udplite_hash, &udplite_port_rover, c);
 }
 
-static __inline__ int udplite_v4_get_port(struct sock *sk, unsigned short snum)
+static int udplite_v4_get_port(struct sock *sk, unsigned short snum)
 {
 	return udplite_get_port(sk, snum, ipv4_rcv_saddr_equal);
 }
 
-__inline__ int udplite_rcv(struct sk_buff *skb)
+static int udplite_rcv(struct sk_buff *skb)
 {
 	return __udp4_lib_rcv(skb, udplite_hash, 1);
 }
 
-__inline__ void udplite_err(struct sk_buff *skb, u32 info)
+static void udplite_err(struct sk_buff *skb, u32 info)
 {
 	return __udp4_lib_err(skb, info, udplite_hash);
 }
--- linux-2.6.19-rc6-mm1/net/ipv6/udplite.c.old	2006-11-24 01:34:21.000000000 +0100
+++ linux-2.6.19-rc6-mm1/net/ipv6/udplite.c	2006-11-24 01:51:24.000000000 +0100
@@ -17,14 +17,14 @@
 
 DEFINE_SNMP_STAT(struct udp_mib, udplite_stats_in6) __read_mostly;
 
-static __inline__ int udplitev6_rcv(struct sk_buff **pskb)
+static int udplitev6_rcv(struct sk_buff **pskb)
 {
 	return __udp6_lib_rcv(pskb, udplite_hash, 1);
 }
 
-static __inline__ void udplitev6_err(struct sk_buff *skb,
-				     struct inet6_skb_parm *opt,
-				     int type, int code, int offset, __be32 info)
+static void udplitev6_err(struct sk_buff *skb,
+			  struct inet6_skb_parm *opt,
+			  int type, int code, int offset, __be32 info)
 {
 	return __udp6_lib_err(skb, opt, type, code, offset, info, udplite_hash);
 }
@@ -35,7 +35,7 @@
 	.flags		=	INET6_PROTO_NOPOLICY|INET6_PROTO_FINAL,
 };
 
-static __inline__ int udplite_v6_get_port(struct sock *sk, unsigned short snum)
+static int udplite_v6_get_port(struct sock *sk, unsigned short snum)
 {
 	return udplite_get_port(sk, snum, ipv6_rcv_saddr_equal);
 }
--- linux-2.6.19-rc6-mm1/net/ipv6/tcp_ipv6.c.old	2006-11-24 01:35:02.000000000 +0100
+++ linux-2.6.19-rc6-mm1/net/ipv6/tcp_ipv6.c	2006-11-24 01:35:14.000000000 +0100
@@ -929,7 +929,7 @@
 	.send_reset	=	tcp_v6_send_reset
 };
 
-struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = {
+static struct tcp_request_sock_ops tcp_request_sock_ipv6_ops = {
 #ifdef CONFIG_TCP_MD5SIG
 	.md5_lookup	=	tcp_v6_reqsk_md5_lookup,
 #endif


  parent reply	other threads:[~2006-11-24 21:58 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-23 10:17 2.6.19-rc6-mm1 Andrew Morton
2006-11-23 10:38 ` 2.6.19-rc6-mm1 Reuben Farrelly
2006-11-23 14:06   ` [PATCH] x86_64: fix build without HOTPLUG_CPU (was Re: 2.6.19-rc6-mm1) Jiri Kosina
2006-11-23 15:08     ` Andi Kleen
2006-11-23 15:17       ` Jiri Kosina
2006-11-23 15:27         ` Andi Kleen
2006-11-23 15:37           ` Jiri Kosina
2006-11-23 16:33             ` Ingo Molnar
2006-11-23 11:23 ` 2.6.19-rc6-mm1 Mariusz Kozlowski
2006-11-23 18:36   ` 2.6.19-rc6-mm1 Andrew Morton
2006-11-23 19:24     ` 2.6.19-rc6-mm1 Mariusz Kozlowski
2006-11-23 20:20     ` 2.6.19-rc6-mm1 Andy Whitcroft
2006-11-23 20:56       ` 2.6.19-rc6-mm1 Andrew Morton
2006-11-24 19:34       ` 2.6.19-rc6-mm1 Matthew Frost
2006-11-23 20:23     ` 2.6.19-rc6-mm1 Benoit Boissinot
2006-11-23 12:22 ` 2.6.19-rc6-mm1 Mariusz Kozlowski
2006-11-23 13:03 ` 2.6.19-rc6-mm1 Andy Whitcroft
2006-11-23 17:26 ` MCORE2 include/asm/module.h:60:2: error: #error unknown processor family [was Re: 2.6.19-rc6-mm1] Mattia Dongili
2006-11-23 23:30 ` 2.6.19-rc6-mm1: no help text for TCP_MD5SIG_DEBUG Adrian Bunk
2006-11-24  1:37   ` David Miller
2006-11-24  0:17 ` 2.6.19-rc6-mm1: drivers/net/chelsio/: unused code Adrian Bunk
2006-11-27 18:24   ` Stephen Hemminger
2006-11-29  7:36     ` Adrian Bunk
2006-11-29  7:47       ` Andrew Morton
2007-02-20  0:02         ` Adrian Bunk
2007-02-20 21:31           ` Stephen Hemminger
2007-02-20 22:06             ` Adrian Bunk
2006-11-24  1:46 ` [-mm patch] make qla2x00_reg_remote_port() static Adrian Bunk
2006-11-27 17:22   ` Andrew Vasquez
2006-11-24  1:46 ` [-mm patch] make proc_pid_io_accounting() static Adrian Bunk
2006-11-24  1:46 ` [-mm patch] make readahead_debug_level static Adrian Bunk
2006-11-24 16:59 ` [PATCH] efi_limit_regions triggers link failure when CONFIG_EFI is not defined Andy Whitcroft
2006-11-24 17:05   ` Andi Kleen
2006-11-24 17:24     ` Andy Whitcroft
2006-11-24 17:33       ` Andi Kleen
2006-11-24 21:30         ` Andrew Morton
2006-11-26  2:13     ` Matthew Frost
2006-11-24 17:58 ` [PATCH] x86_64 vsyscall fails to compile when CONFIG_HOTPLUG_CPU is disabled Andy Whitcroft
2006-11-24 18:03   ` Jiri Kosina
2006-11-24 19:11   ` Andi Kleen
2006-11-24 21:58 ` Adrian Bunk [this message]
2006-12-01  1:28   ` [-mm patch] net/: possible cleanups David Miller
2006-11-25 19:15 ` [-mm patch] include/linux/bug.h must always #include <linux/module.h> Adrian Bunk
2006-11-25 19:17 ` [-mm patch] fs/stack.c should #include <linux/fs_stack.h> Adrian Bunk
2006-11-25 19:57   ` Josef Sipek
2006-11-25 19:21 ` [-mm patch] fs/reiser4/: more possible cleanups Adrian Bunk
2006-11-25 19:48 ` 2.6.19-rc6-mm1 -- sched-improve-migration-accuracy.patch slows boot Don Mullis
2006-11-26  6:24   ` Mike Galbraith
2006-11-27  1:38     ` Don Mullis
2006-11-27 10:16       ` Ingo Molnar
2006-11-28 18:47         ` Don Mullis
2006-11-27 10:50       ` [patch] " Mike Galbraith
2006-11-27 17:17         ` Don Mullis
2006-11-27 18:27           ` Mike Galbraith
2006-11-26  5:40 ` [-mm patch] sound/soc/soc-dapm.c: make 4 functions static Adrian Bunk
2006-11-27  4:21 ` [PATCH] paravirt reorder functions to avoid unspecified behaviour Andy Whitcroft
2006-11-27 11:13   ` Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2007-04-03  5:47 2.6.21-rc5-mm4 Andrew Morton
2007-04-04 15:25 ` [-mm patch] net/: possible cleanups Adrian Bunk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061124215820.GI28363@stusta.de \
    --to=bunk@stusta.de \
    --cc=akpm@osdl.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.