summaryrefslogtreecommitdiffstats
path: root/drivers/ntb
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2015-10-07 09:59:34 +0200
committerJon Mason <jdmason@kudzu.us>2015-11-08 16:24:43 -0500
commitfdcb4b2e78220bde95ce4ba3213088e3a1f1cec6 (patch)
tree1ec34697abd3aae920b523881e3fde74508157f7 /drivers/ntb
parent8b782fab4da771c97a198f6cb496d124dace36fd (diff)
downloadlinux-stable-fdcb4b2e78220bde95ce4ba3213088e3a1f1cec6.tar.gz
linux-stable-fdcb4b2e78220bde95ce4ba3213088e3a1f1cec6.tar.bz2
linux-stable-fdcb4b2e78220bde95ce4ba3213088e3a1f1cec6.zip
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: Arnd Bergmann <arnd@arndb.de> Fixes: e26a5843f7f5 ("NTB: Split ntb_hw_intel and ntb_transport drivers") Signed-off-by: Jon Mason <jdmason@kudzu.us>
Diffstat (limited to 'drivers/ntb')
-rw-r--r--drivers/ntb/ntb_transport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ntb/ntb_transport.c b/drivers/ntb/ntb_transport.c
index be9389599e75..60654d524858 100644
--- a/drivers/ntb/ntb_transport.c
+++ b/drivers/ntb/ntb_transport.c
@@ -825,10 +825,10 @@ static void ntb_transport_link_work(struct work_struct *work)
size = max_mw_size;
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);
- 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);