From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH 3/4] drm/i915: Use unsigned long for obj->user_pin_count Date: Thu, 10 Oct 2013 11:56:52 +0300 Message-ID: <20131010085652.GI13047@intel.com> References: <1381346634-17973-1-git-send-email-daniel.vetter@ffwll.ch> <1381346634-17973-4-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 60E1AE643A for ; Thu, 10 Oct 2013 01:56:56 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1381346634-17973-4-git-send-email-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Daniel Vetter Cc: Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Wed, Oct 09, 2013 at 09:23:53PM +0200, Daniel Vetter wrote: > At least on linux sizeof(long) =3D=3D 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 > --- > 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=E4l=E4 Intel OTC