[openib-general] Problem with using krping

Tom Tucker tom at opengridcomputing.com
Fri Nov 24 19:30:33 PST 2006


Hmmm, or maybe even to more pedantic:

-#define ALIGN(x,a) (((x)+(a)-1UL) & ~((a)-1UL))
+#define ALIGN(x,a) (((x)+(a)-1) & ~((a)-1L))

Because it's only the typed constant in the second term that's causing the
ruckus right? 

Tom

On 11/24/06 8:01 PM, "Roland Dreier" <rdreier at cisco.com> wrote:

> Actually maybe the best fix is
> 
> -#define ALIGN(x,a) (((x)+(a)-1UL)&~((a)-1UL))
> +#define ALIGN(x,a) (((x)+(a)-1L)&~((a)-1L))
> 
> (as far as I can see the problem is that the 1UL makes things
> unsigned, not that it's a long -- so when the mask gets promoted to
> u64, it is not sign extented).
> 
> I'll send a patch to Linus and davem later tonight to see what they say.






More information about the general mailing list