Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit bd50f892 authored by Kyle McMartin's avatar Kyle McMartin Committed by Roland Dreier
Browse files

IB/ehca: Fix ilog2() compile failure



I'm getting compile failures building this driver, which I narrowed
down to the ilog2 call in ehca_get_max_hwpage_size...

    ERROR: ".____ilog2_NaN" [drivers/infiniband/hw/ehca/ib_ehca.ko]
    undefined!
    make[1]: *** [__modpost] Error 1
    make: *** [modules] Error 2

The use of shca->hca_cap_mr_pgsize is confusing the compiler, and
resulting in the __builtin_constant_p in ilog2 going insane.

I tried making it take the u32 pgsize as an argument and the expansion
of shca->_pgsize in the caller, but that failed as well.

With this patch in place, the driver compiles on my GCC 4.6.2 here.

Suggested-by: default avatarRoland Dreier <roland@purestorage.com>
Signed-off-by: default avatarKyle McMartin <kmcmarti@redhat.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent 6aeaa48b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment