From: Helin Zhang Date: Tue, 8 Mar 2016 08:14:09 +0000 (+0800) Subject: i40e/base: fix compilation warnings X-Git-Tag: spdx-start~7387 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=14dc067052ce614b8d2bedae6e6b0f3b8b65c029;p=dpdk.git 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 --- 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;