The scope of these variables can be reduced, so do so. This also eliminates
the need for the extra wrapping/braces.

Also, compact a line since it can fit within 80 columns

Signed-off-by: Tony Nguyen <anthony.l.ngu...@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell...@intel.com>
Signed-off-by: Qi Zhang <qi.z.zh...@intel.com>
---
 drivers/net/ice/base/ice_common.c | 5 +----
 drivers/net/ice/base/ice_fdir.c   | 3 +--
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ice/base/ice_common.c 
b/drivers/net/ice/base/ice_common.c
index 0cf578c34..1acac8640 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -1840,9 +1840,6 @@ ice_parse_caps(struct ice_hw *hw, void *buf, u32 
cap_count,
                                  caps->msix_vector_first_id);
                        break;
                case ICE_AQC_CAPS_FD:
-               {
-                       u32 reg_val, val;
-
                        if (dev_p) {
                                dev_p->num_flow_director_fltr = number;
                                ice_debug(hw, ICE_DBG_INIT,
@@ -1851,6 +1848,7 @@ ice_parse_caps(struct ice_hw *hw, void *buf, u32 
cap_count,
                                          dev_p->num_flow_director_fltr);
                        }
                        if (func_p) {
+                               u32 reg_val, val;
                                if (hw->dcf_enabled)
                                        break;
                                reg_val = rd32(hw, GLQF_FD_SIZE);
@@ -1869,7 +1867,6 @@ ice_parse_caps(struct ice_hw *hw, void *buf, u32 
cap_count,
                                          prefix, func_p->fd_fltr_best_effort);
                        }
                        break;
-               }
                case ICE_AQC_CAPS_MAX_MTU:
                        caps->max_mtu = number;
                        ice_debug(hw, ICE_DBG_INIT, "%s: max_mtu = %d\n",
diff --git a/drivers/net/ice/base/ice_fdir.c b/drivers/net/ice/base/ice_fdir.c
index 6dc8d54da..df754dc74 100644
--- a/drivers/net/ice/base/ice_fdir.c
+++ b/drivers/net/ice/base/ice_fdir.c
@@ -581,8 +581,7 @@ ice_free_fd_shrd_item(struct ice_hw *hw, u16 cntr_id, u16 
num_fltr)
  */
 int ice_get_fdir_cnt_all(struct ice_hw *hw)
 {
-       return hw->func_caps.fd_fltr_guar +
-              hw->func_caps.fd_fltr_best_effort;
+       return hw->func_caps.fd_fltr_guar + hw->func_caps.fd_fltr_best_effort;
 }
 
 /**
-- 
2.13.6

Reply via email to