]> git.droids-corp.org - dpdk.git/blobdiff - drivers/net/i40e/base/i40e_lan_hmc.c
net/thunderx/base: add functions to store qsets
[dpdk.git] / drivers / net / i40e / base / i40e_lan_hmc.c
index 651176718c537dd92a815ac7463d96bceb733a6a..226064847f34458e48fe460f0da54da107709ca3 100644 (file)
@@ -769,7 +769,7 @@ static void i40e_write_byte(u8 *hmc_bits,
 
        /* prepare the bits and mask */
        shift_width = ce_info->lsb % 8;
 
        /* 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;
 
        src_byte = *from;
        src_byte &= mask;
@@ -954,7 +954,7 @@ static void i40e_read_byte(u8 *hmc_bits,
 
        /* prepare the bits and mask */
        shift_width = ce_info->lsb % 8;
 
        /* 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;
 
        /* shift to correct alignment */
        mask <<= shift_width;