[Intel-gfx] [PATCH] drm/i915: Use unsigned long for obj->user_pin_count
Chris Wilson
chris at chris-wilson.co.uk
Thu Oct 10 14:48:56 CEST 2013
On Thu, Oct 10, 2013 at 02:46:37PM +0200, Daniel Vetter wrote:
> At least on linux sizeof(long) == sizeof(void*) and the thinking
> is that you can grab about as many references as there's memory.
>
> Doesn't really matter, just a bit of OCD since the fixed size data
> type in a pure in-kernel datastructure look off.
>
> v2: Ville asked for an overflow check since no one prevents userspace
> from incrementing the pin count forever.
>
> v3: s/INT/LONG/, noticed by Chris.
>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list