]> www.infradead.org Git - users/jedix/linux-maple.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)
committerDhaval Giani <dhaval.giani@oracle.com>
Wed, 8 Mar 2017 00:41:57 +0000 (19:41 -0500)
commit8b1e262d382eb46ca0785d722e14b964534fe336
tree0a13a196e76122649dc6ac04f587750cd70cd937
parent43a0af5b8075f89567b37660e16863ee1e6b1406
i40e: don't truncate match_method assignment

Orabug: 24568124

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>
(cherry picked from commit 0266ac4536cdbf37e0bed918b97b6763aa8b84e2)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_main.c