Re: [PATCH] IB/core: Fix different types mix in ib_device_cap_flags structure values

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 31, 2016 at 11:05:00AM -0700, Bart Van Assche wrote:

> Let me rephrase my question. Before and after this patch
> IB_DEVICE_SG_GAPS_REG is defined as 1ULL << 32, so how can this patch make a
> difference?

Excellent question.

I thought the issue was this:

        IB_DEVICE_ON_DEMAND_PAGING              = (1 << 31),

Because (1<<31) is also technically undefined if 1 is signed, which,
IIRC, is a compiler choice.. But you are right, all the other ones
look OK.

Mellanox, so what does this *actually* do??

> And if the issue is that some compilers choose a 32-bit integer for
> ib_device_cap_flags and others a 64-bit integer, shouldn't

That isn't allowed by the standard. The compiler cannot truncate enum
values.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux