Microsemi / switchtec-kernel

A kernel module for the Microsemi PCIe switch
GNU General Public License v2.0
45 stars 31 forks source link

ntb_hw_switchtec: Fix compile warnings on 32bit arch #50

Closed wesleywesley closed 5 years ago

wesleywesley commented 5 years ago

On 32-bit arch, shift a size_t by 32 bits to the right generating compiler warning: right shift count >= width of type. The code is correct, but using the upper_32_bits() and lower_32_bits() marcos that were introduced for this operation makes it easier to read and avoids the warning.

Fixes: 6c08394bf06e(ntb_hw_switchtec: Added NT BAR Setup Extension Registers for large MWs) Signed-off-by: Wesley Sheng wesley.sheng@microchip.com