]> git.baikalelectronics.ru Git - kernel.git/commit
e1000e: fix call to do_div() to use u64 arg
authorJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 2 May 2015 08:20:04 +0000 (01:20 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Mon, 4 May 2015 08:38:08 +0000 (01:38 -0700)
commit0b38bf46dc2a2d17034055a78ba2536f8cbfdf19
treeee3c5c38622e7147195e70b39ca8dce85157ac04
parent447c22af22fb3ee801897b8a13cef1ecf659b50d
e1000e: fix call to do_div() to use u64 arg

We were using s64 for lat_ns (latency nano-second value) since in
our calculations a negative value could be a resultant.  For negative
values, we then assign lat_ns to be zero, so the value passed to
do_div() was never negative, but do_div() expects the argument type
to be u64, so do a cast to resolve a compile warning seen on
PowerPC.

CC: Yanjiang Jin <yanjiang.jin@windriver.com>
CC: Yanir Lubetkin <yanirx.lubetkin@intel.com>
Reported-by: Yanjiang Jin <yanjiang.jin@windriver.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
drivers/net/ethernet/intel/e1000e/ich8lan.c