Thread (73 messages) 73 messages, 2 authors, 2018-07-02
STALE2908d REVIEWED: 3 (1M)
Revisions (5)
  1. v1 [diff vs current]
  2. v1 current
  3. v1 [diff vs current]
  4. v2 [diff vs current]
  5. v3 [diff vs current]

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

From: Ajit Khaparde <ajit.khaparde@broadcom.com>
Date: 2018-06-19 21:31:08
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

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 <redacted>
Reviewed-by: Ray Jui <redacted>
---
 drivers/net/bnxt/bnxt_cpr.c | 22 ++++++++++------------
 1 file changed, 10 insertions(+), 12 deletions(-)
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)
-- 
2.15.1 (Apple Git-101)
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help