Re: [PATCH] typdef uintptr_t drm_handle_t; unsigned int is wrong on 64-bit.

2010-04-06 Thread Robert Noland
Dave Airlie wrote: > On Sat, Apr 3, 2010 at 11:09 PM, Matthew W. S. Bell > wrote: >> On Sat, 2010-04-03 at 08:49 +0100, Dave Airlie wrote: >>> No, its "designed" as is. We can't change it now as its ABI. We make sure >>> we only use 32-bit handles anyways. > > The thing is "unsigned int" is cor

Re: [PATCH] typdef uintptr_t drm_handle_t; unsigned int is wrong on 64-bit.

2010-04-05 Thread Dave Airlie
On Sat, Apr 3, 2010 at 11:09 PM, Matthew W. S. Bell wrote: > On Sat, 2010-04-03 at 08:49 +0100, Dave Airlie wrote: >> No, its "designed" as is. We can't change it now as its ABI. We make sure >> we only use 32-bit handles anyways. The thing is "unsigned int" is correct for the handles, they are d

Re: [PATCH] typdef uintptr_t drm_handle_t; unsigned int is wrong on 64-bit.

2010-04-04 Thread Matthew W. S. Bell
On Sat, 2010-04-03 at 08:49 +0100, Dave Airlie wrote: > No, its "designed" as is. We can't change it now as its ABI. We make sure > we only use 32-bit handles anyways. OK, is this documented anywhere, as I'd like to pull some of that into a comment? (It appears, on a casual glance, that this type

Re: [PATCH] typdef uintptr_t drm_handle_t; unsigned int is wrong on 64-bit.

2010-04-04 Thread Matthew W. S. Bell
On Sat, 2010-04-03 at 08:49 +0100, Dave Airlie wrote: > No, its "designed" as is. We can't change it now as its ABI. We make sure > we only use 32-bit handles anyways. Sorry, the comment about the ABI is, of course, nonsense, as the assumption is implicit in the kernel ABI. Matthew signature.

Re: [PATCH] typdef uintptr_t drm_handle_t; unsigned int is wrong on 64-bit.

2010-04-03 Thread Dave Airlie
> > drm_handle_t appears to be assigned values from void*. As such unsigned > int is certainly not the same size on 64-bit. Convert to uintptr_t in > all cases as it is defined for this purpose. No, its "designed" as is. We can't change it now as its ABI. We make sure we only use 32-bit handles

[PATCH] typdef uintptr_t drm_handle_t; unsigned int is wrong on 64-bit.

2010-04-03 Thread Matthew W. S. Bell
From d457b05faabde1a51b8e4b8f6fc13af9f07809f8 Mon Sep 17 00:00:00 2001 drm_handle_t appears to be assigned values from void*. As such unsigned int is certainly not the same size on 64-bit. Convert to uintptr_t in all cases as it is defined for this purpose. I fear this patch changes ABI, but I am