]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: mark the value passed to csum_replace_by_diff as __wsum
authorJacob Keller <jacob.e.keller@intel.com>
Mon, 12 Dec 2016 23:44:17 +0000 (15:44 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sun, 19 Feb 2017 04:35:36 +0000 (20:35 -0800)
commit3fb14c6063654714990129e9adf54db9360847ec
tree11abda83d343cc45a2d156e6f90f2779741d1d84
parent8b329f14bd150238796e3d80f52a2c5c33f6c891
i40e: mark the value passed to csum_replace_by_diff as __wsum

Fix, or rather, avoid a sparse warning caused by the fact that
csum_replace_by_diff expects to receive a __wsum value. Since the
calculation appears to work, simply typecast the passed paylen value to
__wsum to avoid the warning.

This seems pretty fishy since __wsum was obviously annotated as
a separate type on purpose, so this throws the entire calculation into
question. Since it currently appears to behave as expected, the typecast
is probably safe.

Change-ID: I4fdc5cddd589abc16098176e8a61127e761488f4
Signed-off-by: Jacob Keller <jacob.e.keller@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_txrx.c
drivers/net/ethernet/intel/i40evf/i40e_txrx.c