From: Helin Zhang Date: Tue, 9 Sep 2014 07:21:29 +0000 (+0800) Subject: i40e/base: force a shifted bit to be unsigned X-Git-Tag: spdx-start~10336 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2408e5b4062412e16435d823248282c7dd906d4e;p=dpdk.git i40e/base: force a shifted bit to be unsigned Force a shifted '1' to be 'unsigned' to avoid shifting a signed int. Signed-off-by: Helin Zhang Reviewed-by: Chen Jing Tested-by: HuilongX Xu --- diff --git a/lib/librte_pmd_i40e/i40e/i40e_hmc.h b/lib/librte_pmd_i40e/i40e/i40e_hmc.h index d1d084a959..eb629fc6fe 100644 --- a/lib/librte_pmd_i40e/i40e/i40e_hmc.h +++ b/lib/librte_pmd_i40e/i40e/i40e_hmc.h @@ -38,7 +38,6 @@ POSSIBILITY OF SUCH DAMAGE. /* forward-declare the HW struct for the compiler */ struct i40e_hw; -enum i40e_status_code; #define I40E_HMC_INFO_SIGNATURE 0x484D5347 /* HMSG */ #define I40E_HMC_PD_CNT_IN_SD 512 @@ -135,7 +134,7 @@ struct i40e_hmc_info { ((((type) == I40E_SD_TYPE_PAGED) ? 0 : 1) << \ I40E_PFHMC_SDDATALOW_PMSDTYPE_SHIFT) | \ (1 << I40E_PFHMC_SDDATALOW_PMSDVALID_SHIFT); \ - val3 = (sd_index) | (1 << I40E_PFHMC_SDCMD_PMSDWR_SHIFT); \ + val3 = (sd_index) | (1u << I40E_PFHMC_SDCMD_PMSDWR_SHIFT); \ wr32((hw), I40E_PFHMC_SDDATAHIGH, val1); \ wr32((hw), I40E_PFHMC_SDDATALOW, val2); \ wr32((hw), I40E_PFHMC_SDCMD, val3); \ @@ -154,7 +153,7 @@ struct i40e_hmc_info { I40E_PFHMC_SDDATALOW_PMSDBPCOUNT_SHIFT) | \ ((((type) == I40E_SD_TYPE_PAGED) ? 0 : 1) << \ I40E_PFHMC_SDDATALOW_PMSDTYPE_SHIFT); \ - val3 = (sd_index) | (1 << I40E_PFHMC_SDCMD_PMSDWR_SHIFT); \ + val3 = (sd_index) | (1u << I40E_PFHMC_SDCMD_PMSDWR_SHIFT); \ wr32((hw), I40E_PFHMC_SDDATAHIGH, 0); \ wr32((hw), I40E_PFHMC_SDDATALOW, val2); \ wr32((hw), I40E_PFHMC_SDCMD, val3); \