dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Emil Velikov <emil.l.velikov@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH libdrm 2/4] omap: zero is a valid fd number, treat it as such
Date: Wed, 15 Jul 2015 13:30:50 +0200	[thread overview]
Message-ID: <20150715113049.GB15045@ulmo.nvidia.com> (raw)
In-Reply-To: <1436883005-6163-2-git-send-email-emil.l.velikov@gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1050 bytes --]

On Tue, Jul 14, 2015 at 03:10:03PM +0100, Emil Velikov wrote:
> Equivalent to the previous patch.
> 
> Cc: Rob Clark <robdclark@gmail.com>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Suggested-by: Thierry Reding <thierry.reding@gmail.com>
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
> ---
>  omap/omap_drm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Thierry Reding <treding@nvidia.com>

> diff --git a/omap/omap_drm.c b/omap/omap_drm.c
> index ff83a93..4a0248d 100644
> --- a/omap/omap_drm.c
> +++ b/omap/omap_drm.c
> @@ -363,7 +363,7 @@ void omap_bo_del(struct omap_bo *bo)
>  		munmap(bo->map, bo->size);
>  	}
>  
> -	if (bo->fd) {
> +	if (bo->fd >= 0) {
>  		close(bo->fd);
>  	}
>  
> @@ -414,7 +414,7 @@ uint32_t omap_bo_handle(struct omap_bo *bo)
>   */
>  int omap_bo_dmabuf(struct omap_bo *bo)
>  {
> -	if (!bo->fd) {
> +	if (bo->fd < 0) {
>  		struct drm_prime_handle req = {
>  				.handle = bo->handle,
>  				.flags = DRM_CLOEXEC,
> -- 
> 2.4.5
> 

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-07-15 11:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-14 14:10 [PATCH libdrm 1/4] freedreno: zero is a valid fd number, treat it as such Emil Velikov
2015-07-14 14:10 ` [PATCH libdrm 2/4] omap: " Emil Velikov
2015-07-15 11:30   ` Thierry Reding [this message]
2015-07-14 14:10 ` [PATCH libdrm 3/4] xf86drm: fix incorrect fd comparison in drmOpenOnce{, WithType} Emil Velikov
2015-07-15 11:47   ` [PATCH libdrm 3/4] xf86drm: fix incorrect fd comparison in drmOpenOnce{,WithType} Thierry Reding
2015-07-15 12:37     ` [PATCH libdrm 3/4] xf86drm: fix incorrect fd comparison in drmOpenOnce{, WithType} Emil Velikov
2015-07-15 12:47       ` [PATCH libdrm 3/4] xf86drm: fix incorrect fd comparison in drmOpenOnce{,WithType} Thierry Reding
2015-07-16 15:53         ` [PATCH libdrm 3/4] xf86drm: fix incorrect fd comparison in drmOpenOnce{, WithType} Emil Velikov
2015-07-14 14:10 ` [PATCH libdrm 4/4] Consistently check the fd value Emil Velikov
2015-07-15 11:47   ` Thierry Reding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150715113049.GB15045@ulmo.nvidia.com \
    --to=thierry.reding@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox