All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: ping: cleanups ping_v4_unhash()
@ 2011-05-23  8:23 Eric Dumazet
  2011-05-23  8:43 ` Vasiliy Kulikov
  2011-05-23 20:29 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Dumazet @ 2011-05-23  8:23 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Vasiliy Kulikov

net/ipv4/ping.c: In function ‘ping_v4_unhash’:
net/ipv4/ping.c:140:28: warning: variable ‘hslot’ set but not used

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Vasiliy Kulikov <segoon@openwall.com>
---
 net/ipv4/ping.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/net/ipv4/ping.c b/net/ipv4/ping.c
index 1f3bb11..9aaa671 100644
--- a/net/ipv4/ping.c
+++ b/net/ipv4/ping.c
@@ -137,9 +137,6 @@ static void ping_v4_unhash(struct sock *sk)
 	struct inet_sock *isk = inet_sk(sk);
 	pr_debug("ping_v4_unhash(isk=%p,isk->num=%u)\n", isk, isk->inet_num);
 	if (sk_hashed(sk)) {
-		struct hlist_nulls_head *hslot;
-
-		hslot = ping_hashslot(&ping_table, sock_net(sk), isk->inet_num);
 		write_lock_bh(&ping_table.lock);
 		hlist_nulls_del(&sk->sk_nulls_node);
 		sock_put(sk);



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

* Re: [PATCH] net: ping: cleanups ping_v4_unhash()
  2011-05-23  8:23 [PATCH] net: ping: cleanups ping_v4_unhash() Eric Dumazet
@ 2011-05-23  8:43 ` Vasiliy Kulikov
  2011-05-23  9:00   ` Eric Dumazet
  2011-05-23 20:29 ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Vasiliy Kulikov @ 2011-05-23  8:43 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: David Miller, netdev

On Mon, May 23, 2011 at 10:23 +0200, Eric Dumazet wrote:
> net/ipv4/ping.c: In function ‘ping_v4_unhash’:
> net/ipv4/ping.c:140:28: warning: variable ‘hslot’ set but not used
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>

Acked-by: Vasiliy Kulikov <segoon@openwall.com>

hslot was used for debugging purposes here.


BTW, what gcc version do you use?  I have no warning with 4.4.3
(Ubuntu 4.4.3-4ubuntu5):

    $ make net/ipv4/ping.o
      CHK     include/linux/version.h
      CHK     include/generated/utsrelease.h
      CALL    scripts/checksyscalls.sh
      CC      net/ipv4/ping.o
    $


Thanks,

-- 
Vasiliy Kulikov
http://www.openwall.com - bringing security into open computing environments

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

* Re: [PATCH] net: ping: cleanups ping_v4_unhash()
  2011-05-23  8:43 ` Vasiliy Kulikov
@ 2011-05-23  9:00   ` Eric Dumazet
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2011-05-23  9:00 UTC (permalink / raw)
  To: Vasiliy Kulikov; +Cc: David Miller, netdev

Le lundi 23 mai 2011 à 12:43 +0400, Vasiliy Kulikov a écrit :
> On Mon, May 23, 2011 at 10:23 +0200, Eric Dumazet wrote:
> > net/ipv4/ping.c: In function ‘ping_v4_unhash’:
> > net/ipv4/ping.c:140:28: warning: variable ‘hslot’ set but not used
> > 
> > Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> 
> Acked-by: Vasiliy Kulikov <segoon@openwall.com>
> 
> hslot was used for debugging purposes here.
> 
> 
> BTW, what gcc version do you use?  I have no warning with 4.4.3
> (Ubuntu 4.4.3-4ubuntu5):
> 
>     $ make net/ipv4/ping.o
>       CHK     include/linux/version.h
>       CHK     include/generated/utsrelease.h
>       CALL    scripts/checksyscalls.sh
>       CC      net/ipv4/ping.o
>     $
> 

I got this warning with gcc-4.6.0 on a 32bit (x86) host




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

* Re: [PATCH] net: ping: cleanups ping_v4_unhash()
  2011-05-23  8:23 [PATCH] net: ping: cleanups ping_v4_unhash() Eric Dumazet
  2011-05-23  8:43 ` Vasiliy Kulikov
@ 2011-05-23 20:29 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2011-05-23 20:29 UTC (permalink / raw)
  To: eric.dumazet; +Cc: netdev, segoon

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Mon, 23 May 2011 10:23:00 +0200

> net/ipv4/ping.c: In function ‘ping_v4_unhash’:
> net/ipv4/ping.c:140:28: warning: variable ‘hslot’ set but not used
> 
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> CC: Vasiliy Kulikov <segoon@openwall.com>

Applied.

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

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

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-23  8:23 [PATCH] net: ping: cleanups ping_v4_unhash() Eric Dumazet
2011-05-23  8:43 ` Vasiliy Kulikov
2011-05-23  9:00   ` Eric Dumazet
2011-05-23 20:29 ` 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.