[Intel-wired-lan] [next PATCH S57 11/11] i40e: mark the value passed to csum_replace_by_diff as __wsum

Bowers, AndrewX andrewx.bowers at intel.com
Fri Dec 16 22:48:40 UTC 2016


> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Bimmy Pujari
> Sent: Monday, December 12, 2016 3:44 PM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S57 11/11] i40e: mark the value
> passed to csum_replace_by_diff as __wsum
> 
> From: Jacob Keller <jacob.e.keller at intel.com>
> 
> 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.
> 
> Signed-off-by: Jacob Keller <jacob.e.keller at intel.com>
> Change-ID: I4fdc5cddd589abc16098176e8a61127e761488f4
> ---
>  drivers/net/ethernet/intel/i40e/i40e_txrx.c   | 5 +++--
>  drivers/net/ethernet/intel/i40evf/i40e_txrx.c | 5 +++--
>  2 files changed, 6 insertions(+), 4 deletions(-)

Tested-by: Andrew Bowers <andrewx.bowers at intel.com>




More information about the Intel-wired-lan mailing list