i40e: fix 32 bit build warnings
authorJesse Brandeburg <jesse.brandeburg@intel.com>
Fri, 14 Aug 2015 01:54:31 +0000 (18:54 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 30 Sep 2015 12:47:48 +0000 (05:47 -0700)
commit9c70d7cebfec558e07a2ab0f2d5f5a80a821ecf5
tree83ea0477b198e6c1e051b0094011f13dbd59b112
parente88ae667ecccf104311ec1a34536bd1e8a0fe6f7
i40e: fix 32 bit build warnings

Sparse found some issues with 32 bit compilation, which probably should
at least work without warning.  Not only that, but the code was wrong.
Thanks sparse!!

And thanks to the kbuild robot zero day testing for finding this issue.

$ make ARCH=i386 M=drivers/net/ethernet/intel/i40e C=2 CF="-D__CHECK_ENDIAN__"
  CHECK   drivers/net/ethernet/intel/i40e/i40e_main.c
  include/linux/etherdevice.h:79:32: warning: restricted __be16 degrades to integer
  drivers/net/ethernet/intel/i40e/i40e_main.c:7565:17: warning: shift too big (32) for type unsigned long
  drivers/net/ethernet/intel/i40e/i40e_main.c:7565:17: warning: shift too big (42) for type unsigned long
  drivers/net/ethernet/intel/i40e/i40e_main.c:7565:17: warning: shift too big (39) for type unsigned long
  drivers/net/ethernet/intel/i40e/i40e_main.c:7565:17: warning: shift too big (40) for type unsigned long

CC: kbuild-all@01.org
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_common.c
drivers/net/ethernet/intel/i40e/i40e_txrx.h