From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [PATCH] intel: non-blocking mmaps on the cheap Date: Thu, 06 Oct 2011 13:55:49 -0700 Message-ID: <87obxthmay.fsf@eliezer.anholt.net> References: <1316734033-17228-1-git-send-email-ben@bwidawsk.net> <1316734033-17228-3-git-send-email-ben@bwidawsk.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0900515301==" Return-path: In-Reply-To: <1316734033-17228-3-git-send-email-ben@bwidawsk.net> 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: intel-gfx@lists.freedesktop.org Cc: Daniel Vetter , Ben Widawsky , "Kilarski, Bernard R" List-Id: intel-gfx@lists.freedesktop.org --===============0900515301== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= On Thu, 22 Sep 2011 16:27:11 -0700, Ben Widawsky wrote: > +/** > + * unmap an object in the non-blocking mode > + */ > +int drm_intel_gem_bo_unmap_nonblocking(drm_intel_bo *bo) > +{ > + drm_intel_bufmgr_gem *bufmgr_gem = (drm_intel_bufmgr_gem *) bo->bufmgr; > + int ret = 0; > + > + if (bo == NULL) > + return 0; > + > + pthread_mutex_lock(&bufmgr_gem->lock); > + bo->virtual = NULL; > + pthread_mutex_unlock(&bufmgr_gem->lock); > + > + return ret; You dereffed bo before checking for NULL, so the compiler will just drop that NULL check. I realize this is copy'n'paste from bo_unmap_gtt, but I don't see why this new copy of bo_unmap_gtt exists anyway. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk6OFdUACgkQHUdvYGzw6vf2jwCfZGrhqZDA+Vpgowwei3tAYSam qYUAn200rGAJTDOidJvtY+DlKqxIXbQJ =OZH1 -----END PGP SIGNATURE----- --=-=-=-- --===============0900515301== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============0900515301==--