Skip to content

Commit

Permalink
i40e: use explicit cast from u16 to u8
Browse files Browse the repository at this point in the history
Current implementation generates compilation warnings.

Change-ID: Icceefb50fe62aefaf90a64afb7192e08355a4ec5
Signed-off-by: Kamil Krawczyk <kamil.krawczyk@intel.com>
Acked-by: Shannon Nelson <shannon.nelson@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Kamil Krawczyk authored and Jeff Kirsher committed Dec 13, 2015
1 parent fdb47ae commit 6621e4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/intel/i40e/i40e_lan_hmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -762,7 +762,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;
Expand Down

0 comments on commit 6621e4b

Please sign in to comment.