net/ixgbe/base: add debug traces
[dpdk.git] / drivers / net / i40e / base / i40e_lan_hmc.c
index 1533a62..f03f381 100644 (file)
@@ -394,7 +394,7 @@ enum i40e_status_code i40e_create_lan_hmc_object(struct i40e_hw *hw,
                                /* update the pd table entry */
                                ret_code = i40e_add_pd_table_entry(hw,
                                                                info->hmc_info,
-                                                               i);
+                                                               i, NULL);
                                if (I40E_SUCCESS != ret_code) {
                                        pd_error = true;
                                        break;
@@ -438,9 +438,8 @@ exit_sd_error:
                        pd_idx1 = max(pd_idx,
                                      ((j - 1) * I40E_HMC_MAX_BP_COUNT));
                        pd_lmt1 = min(pd_lmt, (j * I40E_HMC_MAX_BP_COUNT));
-                       for (i = pd_idx1; i < pd_lmt1; i++) {
+                       for (i = pd_idx1; i < pd_lmt1; i++)
                                i40e_remove_pd_bp(hw, info->hmc_info, i);
-                       }
                        i40e_remove_pd_page(hw, info->hmc_info, (j - 1));
                        break;
                case I40E_SD_TYPE_DIRECT:
@@ -770,7 +769,7 @@ static void i40e_write_byte(u8 *hmc_bits,
 
        /* prepare the bits and mask */
        shift_width = ce_info->lsb % 8;
-       mask = BIT(ce_info->width) - 1;
+       mask = (u8)(BIT(ce_info->width) - 1);
 
        src_byte = *from;
        src_byte &= mask;
@@ -955,7 +954,7 @@ static void i40e_read_byte(u8 *hmc_bits,
 
        /* prepare the bits and mask */
        shift_width = ce_info->lsb % 8;
-       mask = BIT(ce_info->width) - 1;
+       mask = (u8)(BIT(ce_info->width) - 1);
 
        /* shift to correct alignment */
        mask <<= shift_width;
@@ -1240,11 +1239,6 @@ enum i40e_status_code i40e_hmc_get_object_va(struct i40e_hw *hw,
        u64 obj_offset_in_fpm;
        u32 sd_idx, sd_lmt;
 
-       if (NULL == hmc_info) {
-               ret_code = I40E_ERR_BAD_PTR;
-               DEBUGOUT("i40e_hmc_get_object_va: bad hmc_info ptr\n");
-               goto exit;
-       }
        if (NULL == hmc_info->hmc_obj) {
                ret_code = I40E_ERR_BAD_PTR;
                DEBUGOUT("i40e_hmc_get_object_va: bad hmc_info->hmc_obj ptr\n");