[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 10 Oct 2015 20:24:23 +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 simple_return.cocci warnings
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c:156:1-3: WARNING: end returns can be simpified and declaration on line 154 can be dropped
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c:140:1-3: WARNING: end returns can be simpified and declaration on line 138 can be dropped
Simplify a trivial if-return sequence. Possibly combine with a
preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci
CC: Michael Chan <mchan@...adcom.com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---
bnxt_sriov.c | 19 ++-----------------
1 file changed, 2 insertions(+), 17 deletions(-)
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c
@@ -135,31 +135,16 @@ int bnxt_set_vf_mac(struct net_device *d
int bnxt_set_vf_vlan(struct net_device *dev, int vf_id, u16 vlan_id, u8 qos)
{
struct bnxt *bp = netdev_priv(dev);
- int rc;
- rc = bnxt_vf_ndo_prep(bp, vf_id);
- if (rc)
- return rc;
-
- /* CHIMP TODO: send hwrm_func_cfg msg to set new vlan */
-
-
- return 0;
+ return bnxt_vf_ndo_prep(bp, vf_id);
}
int bnxt_set_vf_bw(struct net_device *dev, int vf_id, int tx_rate_rate,
int max_tx_rate)
{
struct bnxt *bp = netdev_priv(dev);
- int rc;
-
- rc = bnxt_vf_ndo_prep(bp, vf_id);
- if (rc)
- return rc;
-
- /* CHIMP TODO: send hwrm_func_cfg msg to set new bandwidth */
- return 0;
+ return bnxt_vf_ndo_prep(bp, vf_id);
}
int bnxt_set_vf_link_state(struct net_device *dev, int vf_id, int link)
--
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