Re: [PATCH 3/4] drm/i915: Use unsigned long for obj->user_pin_count

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

 



On Wed, Oct 09, 2013 at 09:23:53PM +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.

Well, there can be more memory than there is address space.

Unchecked counters always leave me a bit uneasy, so an explicit check
is what I'd prefer to see.

> 
> Doesn't really matter, just a bit of OCD since the fixed size data
> type in a pure in-kernel datastructure look off.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
> ---
>  drivers/gpu/drm/i915/i915_drv.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 7fa017b..f39a6b8 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1567,7 +1567,7 @@ struct drm_i915_gem_object {
>  	unsigned long *bit_17;
>  
>  	/** User space pin count and filp owning the pin */
> -	uint32_t user_pin_count;
> +	unsigned long user_pin_count;
>  	struct drm_file *pin_filp;
>  
>  	/** for phy allocated objects */
> -- 
> 1.8.1.4

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux