aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/ixl/i40e_lan_hmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ixl/i40e_lan_hmc.c')
-rw-r--r--sys/dev/ixl/i40e_lan_hmc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ixl/i40e_lan_hmc.c b/sys/dev/ixl/i40e_lan_hmc.c
index f6c951468c4b..f7bee6a94b57 100644
--- a/sys/dev/ixl/i40e_lan_hmc.c
+++ b/sys/dev/ixl/i40e_lan_hmc.c
@@ -770,7 +770,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 +955,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;