net/ice/base: cleanup style
authorQi Zhang <qi.z.zhang@intel.com>
Fri, 8 Jan 2021 04:20:26 +0000 (12:20 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Jan 2021 18:03:08 +0000 (19:03 +0100)
A few style issues reported by checkpatch have snuck into the code,
resolve the style issues.

PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
drivers/net/ice/base/ice_controlq.h
drivers/net/ice/base/ice_flex_type.h
drivers/net/ice/base/ice_flow.c
drivers/net/ice/base/ice_sched.c

index 161c1be..94e8bfc 100644 (file)
@@ -15,8 +15,8 @@
        (&(((struct ice_aq_desc *)((R).desc_buf.va))[i]))
 
 #define ICE_CTL_Q_DESC_UNUSED(R) \
-       (u16)((((R)->next_to_clean > (R)->next_to_use) ? 0 : (R)->count) + \
-             (R)->next_to_clean - (R)->next_to_use - 1)
+       ((u16)((((R)->next_to_clean > (R)->next_to_use) ? 0 : (R)->count) + \
+              (R)->next_to_clean - (R)->next_to_use - 1))
 
 /* Defines that help manage the driver vs FW API checks.
  * Take a look at ice_aq_ver_check in ice_controlq.c for actual usage.
index 9b9503b..53d396d 100644 (file)
@@ -670,8 +670,8 @@ struct ice_xlt1 {
 #define ICE_PF_NUM_S   13
 #define ICE_PF_NUM_M   (0x07 << ICE_PF_NUM_S)
 #define ICE_VSIG_VALUE(vsig, pf_id) \
-       (u16)((((u16)(vsig)) & ICE_VSIG_IDX_M) | \
-             (((u16)(pf_id) << ICE_PF_NUM_S) & ICE_PF_NUM_M))
+       ((u16)((((u16)(vsig)) & ICE_VSIG_IDX_M) | \
+              (((u16)(pf_id) << ICE_PF_NUM_S) & ICE_PF_NUM_M)))
 #define ICE_DEFAULT_VSIG       0
 
 /* XLT2 Table */
index 15b4306..ad31856 100644 (file)
@@ -3533,9 +3533,9 @@ ice_add_rss_list(struct ice_hw *hw, u16 vsi_handle, struct ice_flow_prof *prof)
  *          3 for tunneled with outer ipv6
  */
 #define ICE_FLOW_GEN_PROFID(hash, hdr, encap) \
-       (u64)(((u64)(hash) & ICE_FLOW_PROF_HASH_M) | \
-             (((u64)(hdr) << ICE_FLOW_PROF_HDR_S) & ICE_FLOW_PROF_HDR_M) | \
-             (((u64)(encap) << ICE_FLOW_PROF_ENCAP_S) & ICE_FLOW_PROF_ENCAP_M))
+       ((u64)(((u64)(hash) & ICE_FLOW_PROF_HASH_M) | \
+              (((u64)(hdr) << ICE_FLOW_PROF_HDR_S) & ICE_FLOW_PROF_HDR_M) | \
+              (((u64)(encap) << ICE_FLOW_PROF_ENCAP_S) & ICE_FLOW_PROF_ENCAP_M)))
 
 static void
 ice_rss_config_xor_word(struct ice_hw *hw, u8 prof_id, u8 src, u8 dst)
index 1cce8ea..53d76d1 100644 (file)
@@ -4289,7 +4289,7 @@ ice_sched_set_node_bw_lmt(struct ice_port_info *pi, struct ice_sched_node *node,
        ice_sched_rm_unused_rl_prof(hw);
 
        layer_num = ice_sched_get_rl_prof_layer(pi, rl_type,
-               node->tx_sched_layer);
+                                               node->tx_sched_layer);
        if (layer_num >= hw->num_tx_sched_layers)
                return ICE_ERR_PARAM;