]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
ice: cleanup style issues
authorBruce Allan <bruce.w.allan@intel.com>
Tue, 2 Mar 2021 18:15:42 +0000 (10:15 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Wed, 31 Mar 2021 21:21:28 +0000 (14:21 -0700)
A few style issues reported by checkpatch have snuck into the code; resolve
the style issues.

COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_controlq.h
drivers/net/ethernet/intel/ice/ice_flex_type.h
drivers/net/ethernet/intel/ice/ice_flow.c

index faaa08e8171b58fe1d6f26835d9deeaecc7e0e6f..7d0905f25ddcf3021fd13dabe6536f6f48e9fae8 100644 (file)
@@ -14,8 +14,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 9806183920de71bb225f3b8576166619c0e63381..7d8b517a63c9c2d876492d17623c0cb0a8e9072e 100644 (file)
@@ -497,8 +497,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 57124579964685ba6f3cf0715cefc8d3f0a3c0fd..4d59eb96383bd4fa5a43b062b95cfeca436d70a8 100644 (file)
@@ -2008,9 +2008,9 @@ ice_add_rss_list(struct ice_hw *hw, u16 vsi_handle, struct ice_flow_prof *prof)
  * [63] - Encapsulation flag, 0 if non-tunneled, 1 if tunneled
  */
 #define ICE_FLOW_GEN_PROFID(hash, hdr, segs_cnt) \
-       (u64)(((u64)(hash) & ICE_FLOW_PROF_HASH_M) | \
-             (((u64)(hdr) << ICE_FLOW_PROF_HDR_S) & ICE_FLOW_PROF_HDR_M) | \
-             ((u8)((segs_cnt) - 1) ? ICE_FLOW_PROF_ENCAP_M : 0))
+       ((u64)(((u64)(hash) & ICE_FLOW_PROF_HASH_M) | \
+              (((u64)(hdr) << ICE_FLOW_PROF_HDR_S) & ICE_FLOW_PROF_HDR_M) | \
+              ((u8)((segs_cnt) - 1) ? ICE_FLOW_PROF_ENCAP_M : 0)))
 
 /**
  * ice_add_rss_cfg_sync - add an RSS configuration