Skip to contentSkip to conversation

net: tcp_memcontrol: minor: remove unused variable

PATCH Applied Daniel Borkmann 2 participants 2 messages Apr 14, 2013 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#1 lore raw

PATCH 1/1 net: tcp_memcontrol: minor: remove unused variable

In reply to a message not in the archive

Commit 10b96f7306e5 (``tcp_memcontrol: remove a redundant statement in tcp_destroy_cgroup()'') says ``We read the value but make no use of it.'', but forgot to remove the variable declaration as well. This was a follow-up commit of 3f1346193 (``memcg: decrement static keys at real destroy time'') that removed the read of variable 'val'.

This fixes therefore:

CC net/ipv4/tcp_memcontrol.o
net/ipv4/tcp_memcontrol.c: In function ‘tcp_destroy_cgroup’:
net/ipv4/tcp_memcontrol.c:67:6: warning: unused variable ‘val’ [-Wunused-variable]

---
 net/ipv4/tcp_memcontrol.c | 1 -
 1 file changed, 1 deletion(-)
net/ipv4/tcp_memcontrol.c +0 -1
index d52196f..da14436 100644
@@ -64,7 +64,6 @@ void tcp_destroy_cgroup(struct mem_cgroup *memcg)
 {
 	struct cg_proto *cg_proto;
 	struct tcp_memcontrol *tcp;
-	u64 val;
 
 	cg_proto = tcp_prot.proto_cgroup(memcg);
 	if (!cg_proto)
Signature · 1 line
1.7.11.7
maintainer Applied
#2 lore raw

From: Daniel Borkmann <[email protected]>
Date: Sun, 14 Apr 2013 20:29:12 +0200

Quoted 6 lines

Commit 10b96f7306e5 (``tcp_memcontrol: remove a redundant statement in tcp_destroy_cgroup()'') says ``We read the value but make no use of it.'', but forgot to remove the variable declaration as well. This was a follow-up commit of 3f1346193 (``memcg: decrement static keys at real destroy time'') that removed the read of variable 'val'.

Quoted 7 lines

This fixes therefore:

CC net/ipv4/tcp_memcontrol.o
net/ipv4/tcp_memcontrol.c: In function ‘tcp_destroy_cgroup’:
net/ipv4/tcp_memcontrol.c:67:6: warning: unused variable ‘val’ [-Wunused-variable]

Applied.