]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: don't truncate match_method assignment
authorKeller, Jacob E <jacob.e.keller@intel.com>
Fri, 9 Dec 2016 21:39:21 +0000 (13:39 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Dec 2016 04:31:19 +0000 (23:31 -0500)
commitb4ef1af1900dd08a89e954c500a69c969e215c4b
tree75cd1fbc3b65ed3bf4537841e1f96358cb876f5a
parent87273c17ddc2513334103eb1729dd205e5010593
i40e: don't truncate match_method assignment

The .match_method field is a u8, so we shouldn't be casting to a u16,
and because it is only one byte, we do not need to byte swap anything.
Just assign the value directly. This avoids issues on Big Endian
architectures which would have byte swapped and then incorrectly
truncated the value.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Bimmy Pujari <bimmy.pujari@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/i40e/i40e_main.c