Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] net: ixgbevf: Remove redundant initialization of variable ret_val
@ 2021-09-10 11:51 Colin King
  2021-11-19 13:26 ` [Intel-wired-lan] " G, GurucharanX
  0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-09-10 11:51 UTC (permalink / raw)
  To: Jesse Brandeburg, Tony Nguyen, David S . Miller, Jakub Kicinski,
	intel-wired-lan, netdev
  Cc: kernel-janitors, linux-kernel

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

The variable ret_val is being initialized with a value that is never
read, it is being updated later on. The assignment is redundant and
can be removed.

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

diff --git a/drivers/net/ethernet/intel/ixgbevf/vf.c b/drivers/net/ethernet/intel/ixgbevf/vf.c
index 5fc347abab3c..d459f5c8e98f 100644
--- a/drivers/net/ethernet/intel/ixgbevf/vf.c
+++ b/drivers/net/ethernet/intel/ixgbevf/vf.c
@@ -66,9 +66,9 @@ static s32 ixgbevf_reset_hw_vf(struct ixgbe_hw *hw)
 {
 	struct ixgbe_mbx_info *mbx = &hw->mbx;
 	u32 timeout = IXGBE_VF_INIT_TIMEOUT;
-	s32 ret_val = IXGBE_ERR_INVALID_MAC_ADDR;
 	u32 msgbuf[IXGBE_VF_PERMADDR_MSG_LEN];
 	u8 *addr = (u8 *)(&msgbuf[1]);
+	s32 ret_val;
 
 	/* Call adapter stop to disable tx/rx and clear interrupts */
 	hw->mac.ops.stop_adapter(hw);
-- 
2.32.0


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

* RE: [Intel-wired-lan] [PATCH] net: ixgbevf: Remove redundant initialization of variable ret_val
  2021-09-10 11:51 [PATCH] net: ixgbevf: Remove redundant initialization of variable ret_val Colin King
@ 2021-11-19 13:26 ` G, GurucharanX
  0 siblings, 0 replies; 2+ messages in thread
From: G, GurucharanX @ 2021-11-19 13:26 UTC (permalink / raw)
  To: Colin King, Brandeburg, Jesse, Nguyen, Anthony L,
	David S . Miller, Jakub Kicinski, intel-wired-lan, netdev
  Cc: kernel-janitors, linux-kernel



> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@osuosl.org> On Behalf Of Colin
> King
> Sent: Friday, September 10, 2021 5:21 PM
> To: Brandeburg, Jesse <jesse.brandeburg@intel.com>; Nguyen, Anthony L
> <anthony.l.nguyen@intel.com>; David S . Miller <davem@davemloft.net>;
> Jakub Kicinski <kuba@kernel.org>; intel-wired-lan@lists.osuosl.org;
> netdev@vger.kernel.org
> Cc: kernel-janitors@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: [Intel-wired-lan] [PATCH] net: ixgbevf: Remove redundant initialization
> of variable ret_val
> 
> From: Colin Ian King <colin.king@canonical.com>
> 
> The variable ret_val is being initialized with a value that is never read, it is
> being updated later on. The assignment is redundant and can be removed.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/net/ethernet/intel/ixgbevf/vf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)

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

end of thread, other threads:[~2021-11-19 13:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-10 11:51 [PATCH] net: ixgbevf: Remove redundant initialization of variable ret_val Colin King
2021-11-19 13:26 ` [Intel-wired-lan] " G, GurucharanX

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