• Jacob Keller's avatar
    fm10k: fix fm10k_get_fault_pf to read correct address · 1fa475fe
    Jacob Keller authored
    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: default avatarJacob Keller <jacob.e.keller@intel.com>
    Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    1fa475fe
fm10k_pf.c 56.3 KB