net: ping: make local functions static
Subsystems (2)
PATCH 1/2 net: ping: make local functions static
As these functions are only used in this file.
Signed-off-by Changli Gao <[email protected]>
--- net/ipv4/ping.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
net/ipv4/ping.c +4 -4
@@ -449,8 +449,8 @@ static int ping_push_pending_frames(struct sock *sk, struct pingfakehdr *pfh, streturn 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;
PATCH 2/2 net: ping: fix the coding style
The characters in a line should be no more than 80.
Signed-off-by Changli Gao <[email protected]>
--- net/ipv4/ping.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
net/ipv4/ping.c +7 -3
@@ -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 ;
Re: [PATCH 2/2] net: ping: fix the coding style
From: Changli Gao <[email protected]>
Date: Thu, 19 May 2011 15:16:01 +0800
Quoted 3 lines
The characters in a line should be no more than 80.
Signed-off-by Changli Gao <[email protected]>
Applied.
From: Changli Gao <[email protected]>
Date: Thu, 19 May 2011 15:16:00 +0800
Quoted 3 lines
As these functions are only used in this file.
Signed-off-by Changli Gao <[email protected]>
Applied.