netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [netfilter-next] netfilter: remove unused refcount variable
@ 2017-03-20 12:37 Arnd Bergmann
  2017-03-20 12:56 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2017-03-20 12:37 UTC (permalink / raw)
  To: Pablo Neira Ayuso, Jozsef Kadlecsik, David S. Miller
  Cc: Arnd Bergmann, Liping Zhang, David Windsor, Reshetova, Elena,
	Nicolas Dichtel, Phil Turnbull, netfilter-devel, coreteam, netdev,
	linux-kernel

The refcount variable was accidentally introduced without any reference
to it. Removing it again avoids this warning:

net/netfilter/nfnetlink_acct.c: In function 'nfnl_acct_try_del':
net/netfilter/nfnetlink_acct.c:329:15: error: unused variable 'refcount' [-Werror=unused-variable]

Fixes: b54ab92b84b6 ("netfilter: refcounter conversions")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 net/netfilter/nfnetlink_acct.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/net/netfilter/nfnetlink_acct.c b/net/netfilter/nfnetlink_acct.c
index f44cbd35357f..c86da174a5fc 100644
--- a/net/netfilter/nfnetlink_acct.c
+++ b/net/netfilter/nfnetlink_acct.c
@@ -326,7 +326,6 @@ static int nfnl_acct_get(struct net *net, struct sock *nfnl,
 static int nfnl_acct_try_del(struct nf_acct *cur)
 {
 	int ret = 0;
-	unsigned int refcount;
 
 	/* We want to avoid races with nfnl_acct_put. So only when the current
 	 * refcnt is 1, we decrease it to 0.
-- 
2.9.0

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

* Re: [PATCH] [netfilter-next] netfilter: remove unused refcount variable
  2017-03-20 12:37 [PATCH] [netfilter-next] netfilter: remove unused refcount variable Arnd Bergmann
@ 2017-03-20 12:56 ` Pablo Neira Ayuso
  0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2017-03-20 12:56 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Jozsef Kadlecsik, David S. Miller, Liping Zhang, David Windsor,
	Reshetova, Elena, Nicolas Dichtel, Phil Turnbull, netfilter-devel,
	coreteam, netdev, linux-kernel

On Mon, Mar 20, 2017 at 01:37:01PM +0100, Arnd Bergmann wrote:
> The refcount variable was accidentally introduced without any reference
> to it. Removing it again avoids this warning:
> 
> net/netfilter/nfnetlink_acct.c: In function 'nfnl_acct_try_del':
> net/netfilter/nfnetlink_acct.c:329:15: error: unused variable 'refcount' [-Werror=unused-variable]

Thanks Arnd. Elena already fixed it here:

https://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next.git/commit/

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

end of thread, other threads:[~2017-03-20 12:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-20 12:37 [PATCH] [netfilter-next] netfilter: remove unused refcount variable Arnd Bergmann
2017-03-20 12:56 ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).