* [Patch] ib/mlx4: Fix build error on platforms where UL is not 64bit
@ 2012-10-17 3:23 Doug Ledford
[not found] ` <6517a144c4ab826f66fcde6ac05cfd17d641811c.1350444206.git.dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Doug Ledford @ 2012-10-17 3:23 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA, roland-DgEjT+Ai2ygdnm+yROfE0A
Cc: Doug Ledford
Line 110 uses UL as a compiler cast for the 0x constant, but
it's not large enough to hold a 64bit value on 32bit arches.
Use ULL instead.
Signed-off-by: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
drivers/infiniband/hw/mlx4/alias_GUID.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/infiniband/hw/mlx4/alias_GUID.c b/drivers/infiniband/hw/mlx4/alias_GUID.c
index d2fb38d..cb790a8 100644
--- a/drivers/infiniband/hw/mlx4/alias_GUID.c
+++ b/drivers/infiniband/hw/mlx4/alias_GUID.c
@@ -107,7 +107,7 @@ static __be64 get_cached_alias_guid(struct mlx4_ib_dev *dev, int port, int index
{
if (index >= NUM_ALIAS_GUID_PER_PORT) {
pr_err("%s: ERROR: asked for index:%d\n", __func__, index);
- return (__force __be64) ((u64) 0xFFFFFFFFFFFFFFFFUL);
+ return (__force __be64) ((u64) 0xFFFFFFFFFFFFFFFFULL);
}
return *(__be64 *)&dev->sriov.demux[port - 1].guid_cache[index];
}
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Patch] ib/mlx4: Fix build error on platforms where UL is not 64bit
[not found] ` <6517a144c4ab826f66fcde6ac05cfd17d641811c.1350444206.git.dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2012-10-18 17:33 ` Roland Dreier
0 siblings, 0 replies; 2+ messages in thread
From: Roland Dreier @ 2012-10-18 17:33 UTC (permalink / raw)
To: Doug Ledford; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
> - return (__force __be64) ((u64) 0xFFFFFFFFFFFFFFFFUL);
> + return (__force __be64) ((u64) 0xFFFFFFFFFFFFFFFFULL);
Thanks, applied, although I tweaked the expression
((u64) 0xFFFFFFFFFFFFFFFFULL)
to be just
-1
The final "(__force __be64) -1" should be correct and work right on both
32-bit and 64-bit.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-18 17:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-17 3:23 [Patch] ib/mlx4: Fix build error on platforms where UL is not 64bit Doug Ledford
[not found] ` <6517a144c4ab826f66fcde6ac05cfd17d641811c.1350444206.git.dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-10-18 17:33 ` Roland Dreier
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.