linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: thunderx: remove a couple of redundant assignments
@ 2017-10-31 14:37 Colin King
  2017-11-01 12:30 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-10-31 14:37 UTC (permalink / raw)
  To: Sunil Goutham, Robert Richter, linux-arm-kernel, netdev
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The assignment to pointer msg is redundant as it is never read, so
remove msg.  Also remove the first assignment to qset as this is not
read before the next re-assignment of a new value to qset in the
for-loop. Cleans up two clang warnings:

drivers/net/ethernet/cavium/thunder/nic_main.c:589:2: warning: Value
stored to 'msg' is never read
drivers/net/ethernet/cavium/thunder/nic_main.c:611:2: warning: Value
stored to 'qset' is never read

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/ethernet/cavium/thunder/nic_main.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/net/ethernet/cavium/thunder/nic_main.c b/drivers/net/ethernet/cavium/thunder/nic_main.c
index fb770b0182d3..988c06a28e5e 100644
--- a/drivers/net/ethernet/cavium/thunder/nic_main.c
+++ b/drivers/net/ethernet/cavium/thunder/nic_main.c
@@ -584,9 +584,6 @@ static void nic_config_cpi(struct nicpf *nic, struct cpi_cfg_msg *cfg)
 static void nic_send_rss_size(struct nicpf *nic, int vf)
 {
 	union nic_mbx mbx = {};
-	u64  *msg;
-
-	msg = (u64 *)&mbx;
 
 	mbx.rss_size.msg = NIC_MBOX_MSG_RSS_SIZE;
 	mbx.rss_size.ind_tbl_size = nic->hw->rss_ind_tbl_size;
@@ -608,7 +605,6 @@ static void nic_config_rss(struct nicpf *nic, struct rss_cfg_msg *cfg)
 	rssi_base = nic->rssi_base[cfg->vf_id] + cfg->tbl_offset;
 
 	rssi = rssi_base;
-	qset = cfg->vf_id;
 
 	for (; rssi < (rssi_base + cfg->tbl_len); rssi++) {
 		u8 svf = cfg->ind_tbl[idx] >> 3;
-- 
2.14.1

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

* Re: [PATCH] net: thunderx: remove a couple of redundant assignments
  2017-10-31 14:37 [PATCH] net: thunderx: remove a couple of redundant assignments Colin King
@ 2017-11-01 12:30 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-11-01 12:30 UTC (permalink / raw)
  To: colin.king
  Cc: sgoutham, rric, linux-arm-kernel, netdev, kernel-janitors, linux-kernel

From: Colin King <colin.king@canonical.com>
Date: Tue, 31 Oct 2017 14:37:55 +0000

> From: Colin Ian King <colin.king@canonical.com>
> 
> The assignment to pointer msg is redundant as it is never read, so
> remove msg.  Also remove the first assignment to qset as this is not
> read before the next re-assignment of a new value to qset in the
> for-loop. Cleans up two clang warnings:
> 
> drivers/net/ethernet/cavium/thunder/nic_main.c:589:2: warning: Value
> stored to 'msg' is never read
> drivers/net/ethernet/cavium/thunder/nic_main.c:611:2: warning: Value
> stored to 'qset' is never read
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Applied.

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

end of thread, other threads:[~2017-11-01 12:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-31 14:37 [PATCH] net: thunderx: remove a couple of redundant assignments Colin King
2017-11-01 12:30 ` 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).