All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] net: ping: make local functions static
@ 2011-05-19  7:16 Changli Gao
  2011-05-19  7:16 ` [PATCH 2/2] net: ping: fix the coding style Changli Gao
  2011-05-19 20:18 ` [PATCH 1/2] net: ping: make local functions static David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Changli Gao @ 2011-05-19  7:16 UTC (permalink / raw)
  To: David S. Miller
  Cc: Alexey Kuznetsov, Pekka Savola (ipv6),
	James Morris, Hideaki YOSHIFUJI, Patrick McHardy, netdev,
	Changli Gao

As these functions are only used in this file.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---
 net/ipv4/ping.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index 6a21da9..5f9e2d1 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -449,8 +449,8 @@ static int ping_push_pending_frames(struct sock *sk, struct pingfakehdr *pfh, st
 	return ip_push_pending_frames(sk, fl4);
 }
 
-int ping_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
-		 size_t len)
+static int ping_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
+			size_t len)
 {
 	struct net *net = sock_net(sk);
 	struct flowi4 fl4;
@@ -621,8 +621,8 @@ do_confirm:
 	goto out;
 }
 
-int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
-		 size_t len, int noblock, int flags, int *addr_len)
+static int ping_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
+			size_t len, int noblock, int flags, int *addr_len)
 {
 	struct inet_sock *isk = inet_sk(sk);
 	struct sockaddr_in *sin = (struct sockaddr_in *)msg->msg_name;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] net: ping: fix the coding style
  2011-05-19  7:16 [PATCH 1/2] net: ping: make local functions static Changli Gao
@ 2011-05-19  7:16 ` Changli Gao
  2011-05-19 20:18   ` David Miller
  2011-05-19 20:18 ` [PATCH 1/2] net: ping: make local functions static David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Changli Gao @ 2011-05-19  7:16 UTC (permalink / raw)
  To: David S. Miller
  Cc: Alexey Kuznetsov, Pekka Savola (ipv6),
	James Morris, Hideaki YOSHIFUJI, Patrick McHardy, netdev,
	Changli Gao

The characters in a line should be no more than 80.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
---
 net/ipv4/ping.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index 5f9e2d1..1f3bb11 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -187,7 +187,8 @@ exit:
 	return sk;
 }
 
-static void inet_get_ping_group_range_net(struct net *net, gid_t *low, gid_t *high)
+static void inet_get_ping_group_range_net(struct net *net, gid_t *low,
+					  gid_t *high)
 {
 	gid_t *data = net->ipv4.sysctl_ping_group_range;
 	unsigned seq;
@@ -437,7 +438,8 @@ static int ping_getfrag(void *from, char * to,
 	return 0;
 }
 
-static int ping_push_pending_frames(struct sock *sk, struct pingfakehdr *pfh, struct flowi4 *fl4)
+static int ping_push_pending_frames(struct sock *sk, struct pingfakehdr *pfh,
+				    struct flowi4 *fl4)
 {
 	struct sk_buff *skb = skb_peek(&sk->sk_write_queue);
 
@@ -754,7 +756,9 @@ static struct sock *ping_get_first(struct seq_file *seq, int start)
 	for (state->bucket = start; state->bucket < PING_HTABLE_SIZE;
 	     ++state->bucket) {
 		struct hlist_nulls_node *node;
-		struct hlist_nulls_head *hslot = &ping_table.hash[state->bucket];
+		struct hlist_nulls_head *hslot;
+
+		hslot = &ping_table.hash[state->bucket];
 
 		if (hlist_nulls_empty(hslot))
 			continue;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] net: ping: make local functions static
  2011-05-19  7:16 [PATCH 1/2] net: ping: make local functions static Changli Gao
  2011-05-19  7:16 ` [PATCH 2/2] net: ping: fix the coding style Changli Gao
@ 2011-05-19 20:18 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2011-05-19 20:18 UTC (permalink / raw)
  To: xiaosuo; +Cc: kuznet, pekkas, jmorris, yoshfuji, kaber, netdev

From: Changli Gao <xiaosuo@gmail.com>
Date: Thu, 19 May 2011 15:16:00 +0800

> As these functions are only used in this file.
> 
> Signed-off-by: Changli Gao <xiaosuo@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] net: ping: fix the coding style
  2011-05-19  7:16 ` [PATCH 2/2] net: ping: fix the coding style Changli Gao
@ 2011-05-19 20:18   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2011-05-19 20:18 UTC (permalink / raw)
  To: xiaosuo; +Cc: kuznet, pekkas, jmorris, yoshfuji, kaber, netdev

From: Changli Gao <xiaosuo@gmail.com>
Date: Thu, 19 May 2011 15:16:01 +0800

> The characters in a line should be no more than 80.
> 
> Signed-off-by: Changli Gao <xiaosuo@gmail.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-19 20:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-19  7:16 [PATCH 1/2] net: ping: make local functions static Changli Gao
2011-05-19  7:16 ` [PATCH 2/2] net: ping: fix the coding style Changli Gao
2011-05-19 20:18   ` David Miller
2011-05-19 20:18 ` [PATCH 1/2] net: ping: make local functions static David Miller

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.