lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191004045203.GA124692@LGEARND20B15>
Date:   Fri, 4 Oct 2019 13:52:03 +0900
From:   Austin Kim <austindh.kim@...il.com>
To:     romieu@...zoreil.com, davem@...emloft.net
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        austindh.kim@...il.com
Subject: [PATCH] net/velocity: fix -Wunused-but-set-variable warnings

'curr_status' is declared as u32.
But this variable is not used after below statement.
   curr_status = vptr->mii_status & (~VELOCITY_LINK_FAIL);

This variable could be dropped to mute below warning message:

   drivers/net/ethernet/via/via-velocity.c:868:6:
   warning: variable ‘curr_status’ set but not used 
   [-Wunused-but-set-variable]

Signed-off-by: Austin Kim <austindh.kim@...il.com>
---
 drivers/net/ethernet/via/via-velocity.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/via/via-velocity.c b/drivers/net/ethernet/via/via-velocity.c
index 346e441..36d402c 100644
--- a/drivers/net/ethernet/via/via-velocity.c
+++ b/drivers/net/ethernet/via/via-velocity.c
@@ -865,11 +865,9 @@ static u32 check_connection_type(struct mac_regs __iomem *regs)
  */
 static int velocity_set_media_mode(struct velocity_info *vptr, u32 mii_status)
 {
-	u32 curr_status;
 	struct mac_regs __iomem *regs = vptr->mac_regs;
 
 	vptr->mii_status = mii_check_media_mode(vptr->mac_regs);
-	curr_status = vptr->mii_status & (~VELOCITY_LINK_FAIL);
 
 	/* Set mii link status */
 	set_mii_flow_control(vptr);
-- 
2.6.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ