Re: [PATCH] ib_ehca: fix compile failure on ppc64

From
Roland Dreier <hidden>
Date
2012-02-28 05:18:35
On Mon, Feb 27, 2012 at 2:02 PM, Kyle McMartin [off-list ref] wrote:
 static u64 ehca_get_max_hwpage_size(struct ehca_shca *shca)
 {
-       return 1UL << ilog2(shca->hca_cap_mr_pgsize);
+       u32 pgsize = shca->hca_cap_mr_pgsize;
+       return 1UL << ilog2(pgsize);
 }
How about using rounddown_pow_of_two(shca->hca_cap_mr_pgsize)?
Does that build?  Because that seems to me to be a cleaner way of
expressing this anyway...

Something about that ilog2() implementation seems to trigger gcc
bugs, I seem to remember some other bogus compile failure on
sparc involving it as well...

 - R.
--
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
Thread (1 message) 1 message, 1 author, last reply 2012-02-28
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help