summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvehemens <vehemens@verizon.net>2008-09-06 14:16:51 -0700
committerRobert Noland <rnoland@2hip.net>2008-09-06 18:55:03 -0400
commit0808cf923d4a851b100d9b7022cb82f5e1f52e28 (patch)
tree8c4fb53fdd24853814fbefc6325241cd8697e0ab
parent6f2479c67432f764bfc4e248689f1737c1935237 (diff)
Style white space cleanup part 2.
Signed-off-by: Robert Noland <rnoland@2hip.net>
-rw-r--r--bsd-core/drm_auth.c3
-rw-r--r--bsd-core/drm_bufs.c8
-rw-r--r--bsd-core/drm_context.c8
-rw-r--r--bsd-core/drm_drv.c14
-rw-r--r--bsd-core/drm_ioctl.c7
-rw-r--r--bsd-core/drm_irq.c2
-rw-r--r--bsd-core/drm_lock.c2
-rw-r--r--bsd-core/drm_scatter.c2
8 files changed, 23 insertions, 23 deletions
diff --git a/bsd-core/drm_auth.c b/bsd-core/drm_auth.c
index 2f8361894..455a71640 100644
--- a/bsd-core/drm_auth.c
+++ b/bsd-core/drm_auth.c
@@ -75,7 +75,8 @@ static int drm_add_magic(struct drm_device *dev, drm_file_t *priv,
hash = drm_hash_magic(magic);
entry = malloc(sizeof(*entry), M_DRM, M_ZERO | M_NOWAIT);
- if (!entry) return ENOMEM;
+ if (!entry)
+ return ENOMEM;
entry->magic = magic;
entry->priv = priv;
entry->next = NULL;
diff --git a/bsd-core/drm_bufs.c b/bsd-core/drm_bufs.c
index 94f513862..9d2b52de0 100644
--- a/bsd-core/drm_bufs.c
+++ b/bsd-core/drm_bufs.c
@@ -611,14 +611,14 @@ static int drm_do_addbufs_pci(struct drm_device *dev, struct drm_buf_desc *reque
entry->seglist[entry->seg_count++] = dmah;
for (i = 0; i < (1 << page_order); i++) {
DRM_DEBUG("page %d @ %p\n",
- dma->page_count + page_count,
- (char *)dmah->vaddr + PAGE_SIZE * i);
+ dma->page_count + page_count,
+ (char *)dmah->vaddr + PAGE_SIZE * i);
temp_pagelist[dma->page_count + page_count++] =
(long)dmah->vaddr + PAGE_SIZE * i;
}
for (offset = 0;
- offset + size <= total && entry->buf_count < count;
- offset += alignment, ++entry->buf_count) {
+ offset + size <= total && entry->buf_count < count;
+ offset += alignment, ++entry->buf_count) {
buf = &entry->buflist[entry->buf_count];
buf->idx = dma->buf_count + entry->buf_count;
buf->total = alignment;
diff --git a/bsd-core/drm_context.c b/bsd-core/drm_context.c
index 24f34fdd7..bca899cb2 100644
--- a/bsd-core/drm_context.c
+++ b/bsd-core/drm_context.c
@@ -108,7 +108,7 @@ int drm_ctxbitmap_init(struct drm_device *dev)
DRM_LOCK();
dev->ctx_bitmap = malloc(PAGE_SIZE, M_DRM, M_NOWAIT | M_ZERO);
- if ( dev->ctx_bitmap == NULL ) {
+ if (dev->ctx_bitmap == NULL) {
DRM_UNLOCK();
return ENOMEM;
}
@@ -214,9 +214,9 @@ int drm_context_switch_complete(struct drm_device *dev, int new)
/* If a context switch is ever initiated
when the kernel holds the lock, release
that lock here. */
- clear_bit(0, &dev->context_flag);
+ clear_bit(0, &dev->context_flag);
- return 0;
+ return 0;
}
int drm_resctx(struct drm_device *dev, void *data, struct drm_file *file_priv)
@@ -229,7 +229,7 @@ int drm_resctx(struct drm_device *dev, void *data, struct drm_file *file_priv)
bzero(&ctx, sizeof(ctx));
for (i = 0; i < DRM_RESERVED_CONTEXTS; i++) {
ctx.handle = i;
- if (DRM_COPY_TO_USER( &res->contexts[i],
+ if (DRM_COPY_TO_USER(&res->contexts[i],
&ctx, sizeof(ctx)))
return EFAULT;
}
diff --git a/bsd-core/drm_drv.c b/bsd-core/drm_drv.c
index 9056c76c6..860b82821 100644
--- a/bsd-core/drm_drv.c
+++ b/bsd-core/drm_drv.c
@@ -408,7 +408,7 @@ static int drm_firstopen(struct drm_device *dev)
return i;
}
- for ( i = 0 ; i < DRM_HASH_SIZE ; i++ ) {
+ for (i = 0; i < DRM_HASH_SIZE; i++) {
dev->magiclist[i].head = NULL;
dev->magiclist[i].tail = NULL;
}
@@ -474,7 +474,7 @@ static int drm_lastclose(struct drm_device *dev)
*/
for (entry = dev->agp->memory; entry; entry = nexte) {
nexte = entry->next;
- if ( entry->bound )
+ if (entry->bound)
drm_agp_unbind_memory(entry->handle);
drm_agp_free_memory(entry->handle);
free(entry, M_DRM);
@@ -543,7 +543,7 @@ static int drm_load(struct drm_device *dev)
dev->types[5] = _DRM_STAT_UNLOCKS;
for (i = 0; i < DRM_ARRAY_SIZE(dev->counts); i++)
- atomic_set( &dev->counts[i], 0 );
+ atomic_set(&dev->counts[i], 0);
if (dev->driver->load != NULL) {
DRM_LOCK();
@@ -718,7 +718,7 @@ int drm_open(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p)
retcode = drm_open_helper(kdev, flags, fmt, p, dev);
if (!retcode) {
- atomic_inc( &dev->counts[_DRM_STAT_OPENS] );
+ atomic_inc(&dev->counts[_DRM_STAT_OPENS]);
DRM_LOCK();
#ifdef __FreeBSD__
device_busy(dev->device);
@@ -794,7 +794,7 @@ int drm_close(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p)
DRM_KERNEL_CONTEXT)) {
dev->lock.file_priv = file_priv;
dev->lock.lock_time = jiffies;
- atomic_inc( &dev->counts[_DRM_STAT_LOCKS] );
+ atomic_inc(&dev->counts[_DRM_STAT_LOCKS]);
break; /* Got lock */
}
/* Contention */
@@ -837,7 +837,7 @@ int drm_close(struct cdev *kdev, int flags, int fmt, DRM_STRUCTPROC *p)
*/
done:
- atomic_inc( &dev->counts[_DRM_STAT_CLOSES] );
+ atomic_inc(&dev->counts[_DRM_STAT_CLOSES]);
#ifdef __FreeBSD__
device_unbusy(dev->device);
#endif
@@ -871,7 +871,7 @@ int drm_ioctl(struct cdev *kdev, u_long cmd, caddr_t data, int flags,
return EINVAL;
}
- atomic_inc( &dev->counts[_DRM_STAT_IOCTLS] );
+ atomic_inc(&dev->counts[_DRM_STAT_IOCTLS]);
++file_priv->ioctl_count;
#ifdef __FreeBSD__
diff --git a/bsd-core/drm_ioctl.c b/bsd-core/drm_ioctl.c
index 0e9966183..ad6bd8197 100644
--- a/bsd-core/drm_ioctl.c
+++ b/bsd-core/drm_ioctl.c
@@ -213,12 +213,11 @@ int drm_getstats(struct drm_device *dev, void *data, struct drm_file *file_priv)
for (i = 0; i < dev->counters; i++) {
if (dev->types[i] == _DRM_STAT_LOCK)
- stats->data[i].value
- = (dev->lock.hw_lock
- ? dev->lock.hw_lock->lock : 0);
+ stats->data[i].value =
+ (dev->lock.hw_lock ? dev->lock.hw_lock->lock : 0);
else
stats->data[i].value = atomic_read(&dev->counts[i]);
- stats->data[i].type = dev->types[i];
+ stats->data[i].type = dev->types[i];
}
stats->count = dev->counters;
diff --git a/bsd-core/drm_irq.c b/bsd-core/drm_irq.c
index 241908c7c..08a0dbc40 100644
--- a/bsd-core/drm_irq.c
+++ b/bsd-core/drm_irq.c
@@ -103,7 +103,7 @@ static void drm_vblank_cleanup(struct drm_device *dev)
/* Bail if the driver didn't call drm_vblank_init() */
if (dev->num_crtcs == 0)
- return;
+ return;
DRM_SPINLOCK_IRQSAVE(&dev->vbl_lock, irqflags);
callout_stop(&dev->vblank_disable_timer);
diff --git a/bsd-core/drm_lock.c b/bsd-core/drm_lock.c
index fe66eca03..631df8e11 100644
--- a/bsd-core/drm_lock.c
+++ b/bsd-core/drm_lock.c
@@ -196,7 +196,7 @@ int drm_lock_free(struct drm_device *dev,
if (_DRM_LOCK_IS_HELD(old) && _DRM_LOCKING_CONTEXT(old) != context) {
DRM_ERROR("%d freed heavyweight lock held by %d\n",
- context, _DRM_LOCKING_CONTEXT(old));
+ context, _DRM_LOCKING_CONTEXT(old));
return 1;
}
DRM_WAKEUP_INT((void *)&dev->lock.lock_queue);
diff --git a/bsd-core/drm_scatter.c b/bsd-core/drm_scatter.c
index 60d098c19..550e6f884 100644
--- a/bsd-core/drm_scatter.c
+++ b/bsd-core/drm_scatter.c
@@ -123,7 +123,7 @@ int drm_sg_free(struct drm_device *dev, void *data, struct drm_file *file_priv)
if (!entry || entry->handle != request->handle)
return EINVAL;
- DRM_DEBUG("sg free virtual = 0x%lx\n", entry->handle);
+ DRM_DEBUG("sg free virtual = 0x%lx\n", entry->handle);
drm_sg_cleanup(entry);