From 14dc067052ce614b8d2bedae6e6b0f3b8b65c029 Mon Sep 17 00:00:00 2001 From: Helin Zhang Date: Tue, 8 Mar 2016 16:14:09 +0800 Subject: [PATCH] i40e/base: fix compilation warnings Fix compilation warnings in base code on some platforms. Fixes: bd6651c2d2d7 ("i40e/base: use bit shift macros") Signed-off-by: Helin Zhang Acked-by: Jingjing Wu Acked-by: Remy Horton --- drivers/net/i40e/base/i40e_lan_hmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/base/i40e_lan_hmc.c b/drivers/net/i40e/base/i40e_lan_hmc.c index 651176718c..226064847f 100644 --- a/drivers/net/i40e/base/i40e_lan_hmc.c +++ b/drivers/net/i40e/base/i40e_lan_hmc.c @@ -769,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; @@ -954,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; -- 2.20.1