[PATCH net-next] strparser: remove redundant variable 'rd_desc'

Subsystems: networking [general], the rest

STALE2929d

2 messages, 2 authors, 2018-08-01 · open the first message on its own page

[PATCH net-next] strparser: remove redundant variable 'rd_desc'

From: YueHaibing <hidden>
Date: 2018-08-01 07:11:19

Variable 'rd_desc' is being assigned but never used,
so can be removed.

fix this clang warning:
net/strparser/strparser.c:411:20: warning: variable ‘rd_desc’ set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <redacted>
---
 net/strparser/strparser.c | 4 ----
 1 file changed, 4 deletions(-)
diff --git a/net/strparser/strparser.c b/net/strparser/strparser.c
index 3a51293..da1a676 100644
--- a/net/strparser/strparser.c
+++ b/net/strparser/strparser.c
@@ -408,8 +408,6 @@ EXPORT_SYMBOL_GPL(strp_data_ready);
 
 static void do_strp_work(struct strparser *strp)
 {
-	read_descriptor_t rd_desc;
-
 	/* We need the read lock to synchronize with strp_data_ready. We
 	 * need the socket lock for calling strp_read_sock.
 	 */
@@ -421,8 +419,6 @@ static void do_strp_work(struct strparser *strp)
 	if (strp->paused)
 		goto out;
 
-	rd_desc.arg.data = strp;
-
 	if (strp_read_sock(strp) == -ENOMEM)
 		queue_work(strp_wq, &strp->work);
 
-- 
2.7.0

Re: [PATCH net-next] strparser: remove redundant variable 'rd_desc'

From: David Miller <davem@davemloft.net>
Date: 2018-08-01 17:47:21

From: YueHaibing <redacted>
Date: Wed, 1 Aug 2018 15:10:37 +0800
Variable 'rd_desc' is being assigned but never used,
so can be removed.

fix this clang warning:
net/strparser/strparser.c:411:20: warning: variable ‘rd_desc’ set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help