All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Michel Thierry <michel.thierry@intel.com>
Cc: intel-gfx@lists.freedesktop.org, Mika Kuoppala <mika.kuoppala@intel.com>
Subject: Re: [PATCH 2/5] drm/i915: i915_dma_map_single returns positive error codes
Date: Tue, 24 Mar 2015 19:03:00 +0300	[thread overview]
Message-ID: <20150324160300.GH16501@mwanda> (raw)
In-Reply-To: <20150324155713.GG16501@mwanda>

On Tue, Mar 24, 2015 at 06:57:13PM +0300, Dan Carpenter wrote:
> > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> > index 645c363..79ade6f 100644
> > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> > @@ -348,7 +348,7 @@ static struct i915_page_table_entry *alloc_pt_single(struct drm_device *dev)
> >  		goto fail_page;
> >  
> >  	ret = i915_dma_map_single(pt, dev);
> > -	if (ret)
> > +	if (ret != 0)
> 
> Heh.  What is this?  :P  You just added a double negative.  Just change
> to return negative error codes on failure.

Oops.  I left out a word.  That should say "Just change
i915_dma_map_page_single() to negative error codes on failure."

Currently, it returns 0 on success and 1 on failure which is
non-standard.

regards,
dan carpenter

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-03-24 16:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-24 15:46 [PATCH 0/5] Finish gen6/7 ppgtt dynamic page allocations Michel Thierry
2015-03-24 15:46 ` [PATCH 1/5] drm/i915: Prevent out of range pt in gen6_for_each_pde Michel Thierry
2015-03-24 15:46 ` [PATCH 2/5] drm/i915: i915_dma_map_single returns positive error codes Michel Thierry
2015-03-24 15:57   ` Dan Carpenter
2015-03-24 16:03     ` Dan Carpenter [this message]
2015-03-24 16:22       ` Michel Thierry
2015-03-24 16:44   ` [PATCH v2] drm/i915: Fix i915_dma_map_single positive error code Michel Thierry
2015-03-24 16:54     ` Daniel Vetter
2015-03-24 21:11     ` shuang.he
2015-03-24 17:06   ` [PATCH v3] " Michel Thierry
2015-03-24 21:10     ` shuang.he
2015-03-24 15:46 ` [PATCH 3/5] drm/i915: Remove unnecessary gen6_ppgtt_unmap_pages Michel Thierry
2015-03-24 15:46 ` [PATCH 4/5] drm/i915: Finish gen6/7 dynamic page table allocation Michel Thierry
2015-03-24 15:46 ` [PATCH 5/5] drm/i915: Add dynamic page trace events Michel Thierry
2015-03-24 19:03   ` shuang.he
2015-03-26 15:43 ` [PATCH 0/5] Finish gen6/7 ppgtt dynamic page allocations Mika Kuoppala
2015-03-27  8:26   ` Daniel Vetter
2015-03-27 15:01     ` Mika Kuoppala

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=20150324160300.GH16501@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=michel.thierry@intel.com \
    --cc=mika.kuoppala@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.