public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][next] net: hns3: remove redundant assignment to pointer reg_info
@ 2019-08-31  7:29 Colin King
  2019-09-01 19:12 ` David Miller
  2021-02-03 13:10 ` [PATCH][next] net: hns3: remove redundant null check of an array Colin King
  0 siblings, 2 replies; 5+ messages in thread
From: Colin King @ 2019-08-31  7:29 UTC (permalink / raw)
  To: Yisen Zhuang, Salil Mehta, David S . Miller, Huazhong Tan,
	Zhongzhu Liu, netdev
  Cc: kernel-janitors, linux-kernel

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

Pointer reg_info is being initialized with a value that is never read and
is being re-assigned a little later on. The assignment is redundant
and hence can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
index 1debe37fe735..1c6b501fb7ca 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_debugfs.c
@@ -279,7 +279,7 @@ static void hclge_dbg_dump_dcb(struct hclge_dev *hdev, const char *cmd_buf)
 
 static void hclge_dbg_dump_reg_cmd(struct hclge_dev *hdev, const char *cmd_buf)
 {
-	struct hclge_dbg_reg_type_info *reg_info = &hclge_dbg_reg_info[0];
+	struct hclge_dbg_reg_type_info *reg_info;
 	bool has_dump = false;
 	int i;
 
-- 
2.20.1

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

end of thread, other threads:[~2021-02-05  3:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-31  7:29 [PATCH][next] net: hns3: remove redundant assignment to pointer reg_info Colin King
2019-09-01 19:12 ` David Miller
2021-02-03 13:10 ` [PATCH][next] net: hns3: remove redundant null check of an array Colin King
2021-02-03 23:24   ` Jesse Brandeburg
2021-02-05  3:00   ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox