[openib-general] Re: [PATCH][0/19] kDAPL: More cleanups in dat.h

Michael S. Tsirkin mst at mellanox.co.il
Wed May 18 01:20:23 PDT 2005


Quoting r. Roland Dreier <roland at topspin.com>:
> Subject: Re: [PATCH][0/19] kDAPL: More cleanups in dat.h
> 
>     James> DAPL was using the uintptr_t type when casting to an
>     James> integer type from a pointer type. Is there another type
>     James> that the kernel uses for this purpose? I know that long is
>     James> typically used, but according to Harbison and Stelle this
>     James> is not guaranteed to be correct.

AFAIK that appeared in the C99 standard.
You need #include <stdint.h> to get these types though.

> The assumption that pointers can be safely cast to and from unsigned
> long is used all over the Linux kernel.  In other words, use "unsigned
> long" instead of "uintptr_t".
> 
>  - R.

Right. Its OK because kernel requires gcc.

-- 
MST - Michael S. Tsirkin



More information about the general mailing list