From 7f6bf84c238a1859ffd409c0ef1f1ca7eb5e6e72 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 5 Nov 2007 12:42:22 +1000 Subject: drm: remove lots of spurious whitespace. Kernel "cleanfile" script run. --- linux-core/drm_bo_lock.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'linux-core/drm_bo_lock.c') diff --git a/linux-core/drm_bo_lock.c b/linux-core/drm_bo_lock.c index e5a86826..46318f6a 100644 --- a/linux-core/drm_bo_lock.c +++ b/linux-core/drm_bo_lock.c @@ -31,19 +31,19 @@ /* * This file implements a simple replacement for the buffer manager use * of the heavyweight hardware lock. - * The lock is a read-write lock. Taking it in read mode is fast, and + * The lock is a read-write lock. Taking it in read mode is fast, and * intended for in-kernel use only. * Taking it in write mode is slow. * - * The write mode is used only when there is a need to block all - * user-space processes from allocating a + * The write mode is used only when there is a need to block all + * user-space processes from allocating a * new memory area. * Typical use in write mode is X server VT switching, and it's allowed * to leave kernel space with the write lock held. If a user-space process * dies while having the write-lock, it will be released during the file * descriptor release. * - * The read lock is typically placed at the start of an IOCTL- or + * The read lock is typically placed at the start of an IOCTL- or * user-space callable function that may end up allocating a memory area. * This includes setstatus, super-ioctls and no_pfn; the latter may move * unmappable regions to mappable. It's a bug to leave kernel space with the @@ -53,7 +53,7 @@ * latency. The locking functions will return -EAGAIN if interrupted by a * signal. * - * Locking order: The lock should be taken BEFORE any kernel mutexes + * Locking order: The lock should be taken BEFORE any kernel mutexes * or spinlocks. */ @@ -140,7 +140,7 @@ int drm_bo_write_lock(struct drm_bo_lock *lock, struct drm_file *file_priv) /* * Add a dummy user-object, the destructor of which will - * make sure the lock is released if the client dies + * make sure the lock is released if the client dies * while holding it. */ -- cgit v1.2.3 From 6ee5412da0cc7516472235805482b8632cb374ef Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 5 Nov 2007 19:09:18 +1000 Subject: drm/ttm: apply linux kernel coding style to bo_lock/move/object/ttm.c --- linux-core/drm_bo_lock.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'linux-core/drm_bo_lock.c') diff --git a/linux-core/drm_bo_lock.c b/linux-core/drm_bo_lock.c index 46318f6a..f967fb7c 100644 --- a/linux-core/drm_bo_lock.c +++ b/linux-core/drm_bo_lock.c @@ -73,7 +73,6 @@ void drm_bo_read_unlock(struct drm_bo_lock *lock) if (atomic_read(&lock->readers) == 0) wake_up_interruptible(&lock->queue); } - EXPORT_SYMBOL(drm_bo_read_unlock); int drm_bo_read_lock(struct drm_bo_lock *lock) @@ -95,7 +94,6 @@ int drm_bo_read_lock(struct drm_bo_lock *lock) } return 0; } - EXPORT_SYMBOL(drm_bo_read_lock); static int __drm_bo_write_unlock(struct drm_bo_lock *lock) @@ -123,9 +121,8 @@ int drm_bo_write_lock(struct drm_bo_lock *lock, struct drm_file *file_priv) int ret = 0; struct drm_device *dev; - if (unlikely(atomic_cmpxchg(&lock->write_lock_pending, 0, 1) != 0)) { + if (unlikely(atomic_cmpxchg(&lock->write_lock_pending, 0, 1) != 0)) return -EINVAL; - } while (unlikely(atomic_cmpxchg(&lock->readers, 0, -1) != 0)) { ret = wait_event_interruptible @@ -149,9 +146,9 @@ int drm_bo_write_lock(struct drm_bo_lock *lock, struct drm_file *file_priv) ret = drm_add_user_object(file_priv, &lock->base, 0); lock->base.remove = &drm_bo_write_lock_remove; lock->base.type = drm_lock_type; - if (ret) { + if (ret) (void)__drm_bo_write_unlock(lock); - } + mutex_unlock(&dev->struct_mutex); return ret; -- cgit v1.2.3