* the ID value used here.
  */
 int
-ice_add_prof(struct ice_hw *hw, enum ice_block blk, u64 id, u8 ptypes[],
-            const struct ice_ptype_attributes *attr, u16 attr_cnt,
-            struct ice_fv_word *es, u16 *masks, bool symm, bool fd_swap)
+ice_add_prof(struct ice_hw *hw, enum ice_block blk, u64 id,
+            unsigned long *ptypes, const struct ice_ptype_attributes *attr,
+            u16 attr_cnt, struct ice_fv_word *es, u16 *masks, bool symm,
+            bool fd_swap)
 {
-       u32 bytes = DIV_ROUND_UP(ICE_FLOW_PTYPE_MAX, BITS_PER_BYTE);
        DECLARE_BITMAP(ptgs_used, ICE_XLT1_CNT);
        struct ice_prof_map *prof;
-       u8 byte = 0;
-       u8 prof_id;
        int status;
+       u8 prof_id;
+       u16 ptype;
 
        bitmap_zero(ptgs_used, ICE_XLT1_CNT);
 
        prof->context = 0;
 
        /* build list of ptgs */
-       while (bytes && prof->ptg_cnt < ICE_MAX_PTG_PER_PROFILE) {
-               u8 bit;
+       for_each_set_bit(ptype, ptypes, ICE_FLOW_PTYPE_MAX) {
+               u8 ptg;
 
-               if (!ptypes[byte]) {
-                       bytes--;
-                       byte++;
+               /* The package should place all ptypes in a non-zero
+                * PTG, so the following call should never fail.
+                */
+               if (ice_ptg_find_ptype(hw, blk, ptype, &ptg))
                        continue;
-               }
 
-               /* Examine 8 bits per byte */
-               for_each_set_bit(bit, (unsigned long *)&ptypes[byte],
-                                BITS_PER_BYTE) {
-                       u16 ptype;
-                       u8 ptg;
-
-                       ptype = byte * BITS_PER_BYTE + bit;
-
-                       /* The package should place all ptypes in a non-zero
-                        * PTG, so the following call should never fail.
-                        */
-                       if (ice_ptg_find_ptype(hw, blk, ptype, &ptg))
-                               continue;
+               /* If PTG is already added, skip and continue */
+               if (test_bit(ptg, ptgs_used))
+                       continue;
 
-                       /* If PTG is already added, skip and continue */
-                       if (test_bit(ptg, ptgs_used))
-                               continue;
+               set_bit(ptg, ptgs_used);
+               /* Check to see there are any attributes for this ptype, and
+                * add them if found.
+                */
+               status = ice_add_prof_attrib(prof, ptg, ptype, attr, attr_cnt);
+               if (status == -ENOSPC)
+                       break;
+               if (status) {
+                       /* This is simple a ptype/PTG with no attribute */
+                       prof->ptg[prof->ptg_cnt] = ptg;
+                       prof->attr[prof->ptg_cnt].flags = 0;
+                       prof->attr[prof->ptg_cnt].mask = 0;
 
-                       __set_bit(ptg, ptgs_used);
-                       /* Check to see there are any attributes for
-                        * this PTYPE, and add them if found.
-                        */
-                       status = ice_add_prof_attrib(prof, ptg, ptype,
-                                                    attr, attr_cnt);
-                       if (status == -ENOSPC)
+                       if (++prof->ptg_cnt >= ICE_MAX_PTG_PER_PROFILE)
                                break;
-                       if (status) {
-                               /* This is simple a PTYPE/PTG with no
-                                * attribute
-                                */
-                               prof->ptg[prof->ptg_cnt] = ptg;
-                               prof->attr[prof->ptg_cnt].flags = 0;
-                               prof->attr[prof->ptg_cnt].mask = 0;
-
-                               if (++prof->ptg_cnt >=
-                                   ICE_MAX_PTG_PER_PROFILE)
-                                       break;
-                       }
                }
-
-               bytes--;
-               byte++;
        }
 
        list_add(&prof->list, &hw->blk[blk].es.prof_map);
 
 
 /* XLT2/VSI group functions */
 int
-ice_add_prof(struct ice_hw *hw, enum ice_block blk, u64 id, u8 ptypes[],
-            const struct ice_ptype_attributes *attr, u16 attr_cnt,
-            struct ice_fv_word *es, u16 *masks, bool symm, bool fd_swap);
+ice_add_prof(struct ice_hw *hw, enum ice_block blk, u64 id,
+            unsigned long *ptypes, const struct ice_ptype_attributes *attr,
+            u16 attr_cnt, struct ice_fv_word *es, u16 *masks, bool symm,
+            bool fd_swap);
 struct ice_prof_map *
 ice_search_prof_id(struct ice_hw *hw, enum ice_block blk, u64 id);
 int
 
        }
 
        /* Add a HW profile for this flow profile */
-       status = ice_add_prof(hw, blk, prof_id, (u8 *)params->ptypes,
+       status = ice_add_prof(hw, blk, prof_id, params->ptypes,
                              params->attr, params->attr_cnt, params->es,
                              params->mask, symm, true);
        if (status) {
                break;
        }
 
-       status = ice_add_prof(hw, blk, id, (u8 *)prof->ptypes,
+       status = ice_add_prof(hw, blk, id, prof->ptypes,
                              params->attr, params->attr_cnt,
                              params->es, params->mask, false, false);
        if (status)