[06/28] net/ice/base: replace u16 with enum

Message ID 20200309114357.31800-7-qi.z.zhang@intel.com (mailing list archive)
State Superseded, archived
Delegated to: xiaolong ye
Headers
Series update ice base code |

Checks

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

Commit Message

Qi Zhang March 9, 2020, 11:43 a.m. UTC
  Use enum ice_flow_field directly so no need to be converted
from u16 for ice_flow_xtract_fld

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_flow.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
  

Patch

diff --git a/drivers/net/ice/base/ice_flow.c b/drivers/net/ice/base/ice_flow.c
index 02f169808..6c413e307 100644
--- a/drivers/net/ice/base/ice_flow.c
+++ b/drivers/net/ice/base/ice_flow.c
@@ -937,15 +937,14 @@  ice_flow_create_xtrct_seq(struct ice_hw *hw,
 
 	for (i = 0; i < params->prof->segs_cnt; i++) {
 		u64 match = params->prof->segs[i].match;
-		u16 j;
+		enum ice_flow_field j;
 
 		for (j = 0; j < ICE_FLOW_FIELD_IDX_MAX && match; j++) {
 			const u64 bit = BIT_ULL(j);
 
 			if (match & bit) {
-				status = ice_flow_xtract_fld
-					(hw, params, i, (enum ice_flow_field)j,
-					 match);
+				status = ice_flow_xtract_fld(hw, params, i, j,
+							     match);
 				if (status)
 					return status;
 				match &= ~bit;