提交 fdcb4b2e 编写于 作者: A Arnd Bergmann 提交者: Jon Mason

NTB: fix 32-bit compiler warning

resource_size_t may be 32-bit wide on some architectures, which causes
this warning when building the NTB code:

drivers/ntb/ntb_transport.c: In function 'ntb_transport_link_work':
drivers/ntb/ntb_transport.c:828:46: warning: right shift count >= width of type [-Wshift-count-overflow]

The warning is harmless but can be avoided by using the upper_32_bits()
macro.
Signed-off-by: NArnd Bergmann <arnd@arndb.de>
Fixes: e26a5843 ("NTB: Split ntb_hw_intel and ntb_transport drivers")
Signed-off-by: NJon Mason <jdmason@kudzu.us>
上级 8b782fab
...@@ -825,10 +825,10 @@ static void ntb_transport_link_work(struct work_struct *work) ...@@ -825,10 +825,10 @@ static void ntb_transport_link_work(struct work_struct *work)
size = max_mw_size; size = max_mw_size;
spad = MW0_SZ_HIGH + (i * 2); spad = MW0_SZ_HIGH + (i * 2);
ntb_peer_spad_write(ndev, spad, (u32)(size >> 32)); ntb_peer_spad_write(ndev, spad, upper_32_bits(size));
spad = MW0_SZ_LOW + (i * 2); spad = MW0_SZ_LOW + (i * 2);
ntb_peer_spad_write(ndev, spad, (u32)size); ntb_peer_spad_write(ndev, spad, lower_32_bits(size));
} }
ntb_peer_spad_write(ndev, NUM_MWS, nt->mw_count); ntb_peer_spad_write(ndev, NUM_MWS, nt->mw_count);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册