]> git.baikalelectronics.ru Git - kernel.git/commit
fm10k: fix fm10k_get_fault_pf to read correct address
authorJacob Keller <jacob.e.keller@intel.com>
Mon, 8 Jul 2019 23:12:36 +0000 (16:12 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sun, 4 Aug 2019 11:41:44 +0000 (04:41 -0700)
commit5e8742327432efa4b4b3642975da3928c60b1408
treeb39d1d296544eba3098fb026f455fd04d0a70c4b
parent461fc22b80467da560ba0ae9baa1ff0dd63fab39
fm10k: fix fm10k_get_fault_pf to read correct address

Fix assignment of the FM10K_FAULT_ADDR_LO register into fault->address
by using a bit-wise |= operation. Without this, the low address is
completely overwriting the high potion of the address. This caused the
fault to incorrectly return only the lower 32 bits of the fault address.

This issue was detected by cppcheck and resolves the following warnings
produced by that tool:

[fm10k_pf.c:1668] -> [fm10k_pf.c:1670]: (style) Variable
'fault->address' is reassigned a value before the old one has been used.

[fm10k_pf.c:1669] -> [fm10k_pf.c:1670]: (style) Variable
'fault->address' is reassigned a value before the old one has been used.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/fm10k/fm10k_pf.c