diff mbox series

[10/31] net/bnxt: code cleanup style of bnxt cpr

Message ID 20180619213058.12273-11-ajit.khaparde@broadcom.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers show
Series bnxt patchset | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Ajit Khaparde June 19, 2018, 9:30 p.m. UTC
From: Scott Branden <scott.branden@broadcom.com>

Cleanup alignment, brackets, debug string style of bnxt_cpr

Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Qingmin Liu <qingmin.liu@broadcom.com>
Reviewed-by: Ray Jui <ray.jui@broadcom.com>
---
 drivers/net/bnxt/bnxt_cpr.c | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/drivers/net/bnxt/bnxt_cpr.c b/drivers/net/bnxt/bnxt_cpr.c
index ff20b6fdf..7257bbedc 100644
--- a/drivers/net/bnxt/bnxt_cpr.c
+++ b/drivers/net/bnxt/bnxt_cpr.c
@@ -74,12 +74,12 @@  void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)
 	fwd_cmd = (struct input *)bp->pf.vf_info[vf_id].req_buf;
 
 	if (fw_vf_id < bp->pf.first_vf_id ||
-	    fw_vf_id >= (bp->pf.first_vf_id) + bp->pf.active_vfs) {
+	    fw_vf_id >= bp->pf.first_vf_id + bp->pf.active_vfs) {
 		PMD_DRV_LOG(ERR,
-		"FWD req's source_id 0x%x out of range 0x%x - 0x%x (%d %d)\n",
-			fw_vf_id, bp->pf.first_vf_id,
-			(bp->pf.first_vf_id) + bp->pf.active_vfs - 1,
-			bp->pf.first_vf_id, bp->pf.active_vfs);
+			    "FWD req 0x%x out of range 0x%x - 0x%x (%d %d)\n",
+			    fw_vf_id, bp->pf.first_vf_id,
+			    bp->pf.first_vf_id + bp->pf.active_vfs - 1,
+			    bp->pf.first_vf_id, bp->pf.active_vfs);
 		goto reject;
 	}
 
@@ -95,7 +95,7 @@  void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)
 			if (vfc->enables &
 			    HWRM_FUNC_VF_CFG_INPUT_ENABLES_DFLT_MAC_ADDR) {
 				bnxt_hwrm_func_vf_mac(bp, vf_id,
-				(const uint8_t *)"\x00\x00\x00\x00\x00");
+				     (const uint8_t *)"\x00\x00\x00\x00\x00");
 			}
 		}
 		if (fwd_cmd->req_type == HWRM_CFA_L2_SET_RX_MASK) {
@@ -104,10 +104,10 @@  void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)
 
 			srm->vlan_tag_tbl_addr = rte_cpu_to_le_64(0);
 			srm->num_vlan_tags = rte_cpu_to_le_32(0);
-			srm->mask &= ~rte_cpu_to_le_32(
-				HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLANONLY |
-			    HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLAN_NONVLAN |
-			    HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ANYVLAN_NONVLAN);
+			srm->mask &= ~rte_cpu_to_le_32
+			  (HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLANONLY |
+			   HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_VLAN_NONVLAN |
+			   HWRM_CFA_L2_SET_RX_MASK_INPUT_MASK_ANYVLAN_NONVLAN);
 		}
 		/* Forward */
 		rc = bnxt_hwrm_exec_fwd_resp(bp, fw_vf_id, fwd_cmd, req_len);
@@ -128,8 +128,6 @@  void bnxt_handle_fwd_req(struct bnxt *bp, struct cmpl_base *cmpl)
 			fw_vf_id - bp->pf.first_vf_id,
 			rte_le_to_cpu_16(fwd_cmd->req_type));
 	}
-
-	return;
 }
 
 int bnxt_event_hwrm_resp_handler(struct bnxt *bp, struct cmpl_base *cmp)