From: Jean Delvare <khali@linux-fr.org>
To: dri-devel@lists.freedesktop.org
Cc: Thomas Hellstrom <thellstrom@vmware.com>,
Jerome Glisse <jglisse@redhat.com>
Subject: [PATCH] drm/ttm: Simplify ttm_bo_wait_unreserved
Date: Sat, 9 Oct 2010 14:36:45 +0200 [thread overview]
Message-ID: <20101009143645.1f14b266@endymion.delvare> (raw)
Function ttm_bo_wait_unreserved can be slightly simplified.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: Jerome Glisse <jglisse@redhat.com>
---
drivers/gpu/drm/ttm/ttm_bo.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
--- linux-2.6.36-rc7.orig/drivers/gpu/drm/ttm/ttm_bo.c 2010-10-09 13:38:39.000000000 +0200
+++ linux-2.6.36-rc7/drivers/gpu/drm/ttm/ttm_bo.c 2010-10-09 14:23:07.000000000 +0200
@@ -169,18 +169,13 @@ static void ttm_bo_release_list(struct k
int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo, bool interruptible)
{
-
if (interruptible) {
- int ret = 0;
-
- ret = wait_event_interruptible(bo->event_queue,
+ return wait_event_interruptible(bo->event_queue,
atomic_read(&bo->reserved) == 0);
- if (unlikely(ret != 0))
- return ret;
} else {
wait_event(bo->event_queue, atomic_read(&bo->reserved) == 0);
+ return 0;
}
- return 0;
}
EXPORT_SYMBOL(ttm_bo_wait_unreserved);
--
Jean Delvare
reply other threads:[~2010-10-09 12:36 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20101009143645.1f14b266@endymion.delvare \
--to=khali@linux-fr.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jglisse@redhat.com \
--cc=thellstrom@vmware.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.