diff options
Diffstat (limited to 'bsd-core')
-rw-r--r-- | bsd-core/drm_auth.c | 3 | ||||
-rw-r--r-- | bsd-core/drm_bufs.c | 8 | ||||
-rw-r--r-- | bsd-core/drm_context.c | 8 | ||||
-rw-r--r-- | bsd-core/drm_drv.c | 14 | ||||
-rw-r--r-- | bsd-core/drm_ioctl.c | 7 | ||||
-rw-r--r-- | bsd-core/drm_irq.c | 2 | ||||
-rw-r--r-- | bsd-core/drm_lock.c | 2 | ||||
-rw-r--r-- | bsd-core/drm_scatter.c | 2 |
8 files changed, 23 insertions, 23 deletions
diff --git a/bsd-core/drm_auth.c b/bsd-core/drm_auth.c index 2f836189..455a7164 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 94f51386..9d2b52de 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 24f34fdd..bca899cb 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 9056c76c..860b8282 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 0e996618..ad6bd819 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 241908c7..08a0dbc4 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 fe66eca0..631df8e1 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 60d098c1..550e6f88 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); |