Skip to content

ntb_hw_switchtec: Fix compile warnings on 32bit arch#50

Merged
wesleywesley merged 1 commit intodevelfrom
ntb_32bit_mw
Dec 4, 2018
Merged

ntb_hw_switchtec: Fix compile warnings on 32bit arch#50
wesleywesley merged 1 commit intodevelfrom
ntb_32bit_mw

Conversation

@wesleywesley
Copy link
Copy Markdown
Contributor

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: 6c08394(ntb_hw_switchtec: Added NT BAR Setup Extension Registers for large MWs)
Signed-off-by: Wesley Sheng wesley.sheng@microchip.com

@wesleywesley wesleywesley requested review from a user, kelvin-cao and lsgunth December 3, 2018 07:43
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: 6c08394(ntb_hw_switchtec: Added NT BAR Setup Extension Registers for large MWs)
Signed-off-by: Wesley Sheng <wesley.sheng@microchip.com>
Copy link
Copy Markdown
Collaborator

@lsgunth lsgunth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@wesleywesley wesleywesley merged commit 7818666 into devel Dec 4, 2018
@wesleywesley wesleywesley deleted the ntb_32bit_mw branch December 5, 2018 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants