linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] strparser: remove redundant variable 'rd_desc'
@ 2018-08-01  7:10 YueHaibing
  2018-08-01 17:00 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2018-08-01  7:10 UTC (permalink / raw)
  To: davem, doronrk, tom, vakul.garg, davejwatson, ebiggers, john.fastabend
  Cc: linux-kernel, netdev, YueHaibing

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 <yuehaibing@huawei.com>
---
 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



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

* Re: [PATCH net-next] strparser: remove redundant variable 'rd_desc'
  2018-08-01  7:10 [PATCH net-next] strparser: remove redundant variable 'rd_desc' YueHaibing
@ 2018-08-01 17:00 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-08-01 17:00 UTC (permalink / raw)
  To: yuehaibing
  Cc: doronrk, tom, vakul.garg, davejwatson, ebiggers, john.fastabend,
	linux-kernel, netdev

From: YueHaibing <yuehaibing@huawei.com>
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 <yuehaibing@huawei.com>

Applied.

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

end of thread, other threads:[~2018-08-01 17:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-01  7:10 [PATCH net-next] strparser: remove redundant variable 'rd_desc' YueHaibing
2018-08-01 17:00 ` David Miller

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).