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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 10 Oct 2015 20:24:22 +0800
From:	kbuild test robot <lkp@...el.com>
To:	Michael Chan <mchan@...adcom.com>
Cc:	kbuild-all@...org, davem@...emloft.net, netdev@...r.kernel.org
Subject: [PATCH] bnxt_en: fix returnvar.cocci warnings

drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c:521:5-7: Unneeded variable: "rc". Return "0" on line 595


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

CC: Michael Chan <mchan@...adcom.com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---

Please take the patch only if it's a positive warning. Thanks!

 bnxt_ethtool.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c
@@ -518,7 +518,6 @@ u32 bnxt_fw_to_ethtool_speed(u16 fw_link
 
 static int bnxt_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
 {
-	int rc = 0;
 	struct bnxt *bp = netdev_priv(dev);
 	struct bnxt_link_info *link_info = &bp->link_info;
 	u16 ethtool_speed;
@@ -592,7 +591,7 @@ static int bnxt_get_settings(struct net_
 		cmd->transceiver = XCVR_EXTERNAL;
 	cmd->phy_address = link_info->phy_addr;
 
-	return rc;
+	return 0;
 }
 
 static u32 bnxt_get_fw_speed(struct net_device *dev, u16 ethtool_speed)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ