[Intel-wired-lan] [next PATCH S5 03/10] i40e: Use signed variable
Bowers, AndrewX
andrewx.bowers at intel.com
Fri May 3 23:36:41 UTC 2019
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Alice Michael
> Sent: Wednesday, April 24, 2019 5:21 AM
> To: Michael, Alice <alice.michael at intel.com>; intel-wired-
> lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [next PATCH S5 03/10] i40e: Use signed variable
>
> From: Mitch Williams <mitch.a.williams at intel.com>
>
> The counter variable in i40e_clean_tx_irq starts out negative and climbs to 0.
> So it should not be defined as a u16. This was working by accident due to the
> fact the u16 overflows and underflows predictably.
>
> Replace the u16 with int, which is signed and can handle the negativity.
>
> Signed-off-by: Mitch Williams <mitch.a.williams at intel.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_txrx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Tested-by: Andrew Bowers <andrewx.bowers at intel.com>
More information about the Intel-wired-lan
mailing list