]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: Use signed variable
authorMitch Williams <mitch.a.williams@intel.com>
Wed, 24 Apr 2019 12:20:48 +0000 (05:20 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 14 Jun 2019 19:59:16 +0000 (12:59 -0700)
commit1c484c04ef6bae6998144e6a97b5704849110df5
tree3c2471747ab731e4a0c7b10afb4c804d314df4cd
parentd34146eb769338342ce8e64c78e79fc6a460d2b7
i40e: Use signed variable

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@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