From: kbuild test robot <lkp@intel.com>
To: Michael Chan <mchan@broadcom.com>
Cc: kbuild-all@01.org, davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH] bnxt_en: fix simple_return.cocci warnings
Date: Sat, 10 Oct 2015 20:24:23 +0800 [thread overview]
Message-ID: <20151010122422.GA58962@ivytown2> (raw)
In-Reply-To: <1444477151-2225-1-git-send-email-mchan@broadcom.com>
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@broadcom.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.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)
next prev parent reply other threads:[~2015-10-10 12:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-10 11:39 [PATCH net-next] bnxt_en: New Broadcom ethernet driver Michael Chan
2015-10-10 12:23 ` kbuild test robot
2015-10-10 12:24 ` kbuild test robot
2015-10-10 12:24 ` [PATCH] bnxt_en: fix simple_return.cocci warnings kbuild test robot
2015-10-10 12:24 ` [PATCH] bnxt_en: fix returnvar.cocci warnings kbuild test robot
2015-10-10 12:24 ` [PATCH] bnxt_en: fix semicolon.cocci warnings kbuild test robot
2015-10-10 12:24 ` [PATCH] bnxt_en: fix array_size.cocci warnings kbuild test robot
2015-10-10 12:24 ` [PATCH] bnxt_en: fix returnvar.cocci warnings kbuild test robot
2015-10-10 12:24 ` kbuild test robot [this message]
2015-10-10 15:51 ` [PATCH net-next] bnxt_en: New Broadcom ethernet driver Joe Perches
2015-10-10 17:00 ` kbuild test robot
2015-10-10 19:17 ` kbuild test robot
2015-10-11 6:54 ` Dmitry Kravkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151010122422.GA58962@ivytown2 \
--to=lkp@intel.com \
--cc=davem@davemloft.net \
--cc=kbuild-all@01.org \
--cc=mchan@broadcom.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.