]> git.baikalelectronics.ru Git - kernel.git/commit
ice: fix numeric overflow warning
authorBruce Allan <bruce.w.allan@intel.com>
Fri, 8 Feb 2019 20:50:35 +0000 (12:50 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 25 Feb 2019 16:56:01 +0000 (08:56 -0800)
commit51e0b625fe10cc1a35342cb3fe7b613c1da1db1b
tree159f3e8ad1e3a04d2f5efe739e73fa7762bdc73e
parentce94e430542c1779bb3ea0c6121098c0fc271521
ice: fix numeric overflow warning

When compiling and analyzing the driver on newer kernels, a static
analyzer warns about the following "numeric overflow" issues:

  "The result of expression: 'budget-1' generates 4-byte type while casting
   to a bigger size of 8-byte".

  "The result of expression: '*words-words_read' generates 4-byte type
   while casting to a bigger size of 8-byte".

Fix them both.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ice/ice_nvm.c
drivers/net/ethernet/intel/ice/ice_txrx.c