diff options
author | Thomas Hellstrom <thellstrom-at-vmware-dot-com> | 2009-02-13 21:58:33 +0100 |
---|---|---|
committer | Thomas Hellstrom <thellstrom-at-vmware-dot-com> | 2009-02-13 21:58:33 +0100 |
commit | 8be10a790e8a83dae53bf3e05989cd417aae46ef (patch) | |
tree | f25408497dcdc61d87888e4567f00676ed73b4b5 | |
parent | a520b3ed013f534e93784ab46489f8b72f16f5cf (diff) |
More bool conversion.
-rw-r--r-- | linux-core/ttm/ttm_execbuf_util.c | 8 | ||||
-rw-r--r-- | linux-core/ttm/ttm_execbuf_util.h | 2 | ||||
-rw-r--r-- | linux-core/ttm/ttm_fence_user.c | 2 | ||||
-rw-r--r-- | linux-core/ttm/ttm_lock.c | 2 | ||||
-rw-r--r-- | linux-core/ttm/ttm_object.c | 8 | ||||
-rw-r--r-- | linux-core/ttm/ttm_object.h | 6 | ||||
-rw-r--r-- | linux-core/ttm/ttm_placement_user.c | 2 |
7 files changed, 15 insertions, 15 deletions
diff --git a/linux-core/ttm/ttm_execbuf_util.c b/linux-core/ttm/ttm_execbuf_util.c index 74b8f8f2..4a34c18c 100644 --- a/linux-core/ttm/ttm_execbuf_util.c +++ b/linux-core/ttm/ttm_execbuf_util.c @@ -42,7 +42,7 @@ void ttm_eu_backoff_reservation(struct list_head *list) if (!entry->reserved) continue; - entry->reserved = 0; + entry->reserved = false; ttm_bo_unreserve(bo); } } @@ -68,7 +68,7 @@ int ttm_eu_reserve_buffers(struct list_head *list, uint32_t val_seq) list_for_each_entry(entry, list, head) { struct ttm_buffer_object *bo = entry->bo; - entry->reserved = 0; + entry->reserved = false; ret = ttm_bo_reserve(bo, true, false, true, val_seq); if (ret != 0) { ttm_eu_backoff_reservation(list); @@ -81,7 +81,7 @@ int ttm_eu_reserve_buffers(struct list_head *list, uint32_t val_seq) return ret; } - entry->reserved = 1; + entry->reserved = true; if (unlikely(atomic_read(&bo->cpu_writers) > 0)) { ttm_eu_backoff_reservation(list); ret = ttm_bo_wait_cpu(bo, false); @@ -108,7 +108,7 @@ void ttm_eu_fence_buffer_objects(struct list_head *list, void *sync_obj) bo->sync_obj_arg = entry->new_sync_obj_arg; mutex_unlock(&bo->mutex); ttm_bo_unreserve(bo); - entry->reserved = 0; + entry->reserved = false; if (old_sync_obj) driver->sync_obj_unref(&old_sync_obj); } diff --git a/linux-core/ttm/ttm_execbuf_util.h b/linux-core/ttm/ttm_execbuf_util.h index ed1022b0..6577f63a 100644 --- a/linux-core/ttm/ttm_execbuf_util.h +++ b/linux-core/ttm/ttm_execbuf_util.h @@ -51,7 +51,7 @@ struct ttm_validate_buffer { struct list_head head; struct ttm_buffer_object *bo; void *new_sync_obj_arg; - int reserved; + bool reserved; }; /** diff --git a/linux-core/ttm/ttm_fence_user.c b/linux-core/ttm/ttm_fence_user.c index c35d8cf0..f382ef2c 100644 --- a/linux-core/ttm/ttm_fence_user.c +++ b/linux-core/ttm/ttm_fence_user.c @@ -148,7 +148,7 @@ ttm_fence_user_create(struct ttm_fence_device *fdev, tmp = ttm_fence_object_ref(&ufence->fence); ret = ttm_base_object_init(tfile, &ufence->base, - 0, ttm_fence_type, + false, ttm_fence_type, &ttm_fence_user_release, NULL); if (unlikely(ret != 0)) diff --git a/linux-core/ttm/ttm_lock.c b/linux-core/ttm/ttm_lock.c index 0ada36fe..726a6f6c 100644 --- a/linux-core/ttm/ttm_lock.c +++ b/linux-core/ttm/ttm_lock.c @@ -147,7 +147,7 @@ int ttm_write_lock(struct ttm_lock *lock, * while holding it. */ - ret = ttm_base_object_init(tfile, &lock->base, 0, + ret = ttm_base_object_init(tfile, &lock->base, false, ttm_lock_type, &ttm_write_lock_remove, NULL); if (ret) (void)__ttm_write_unlock(lock); diff --git a/linux-core/ttm/ttm_object.c b/linux-core/ttm/ttm_object.c index 14f0d6c0..45cd2bb1 100644 --- a/linux-core/ttm/ttm_object.c +++ b/linux-core/ttm/ttm_object.c @@ -142,7 +142,7 @@ static inline void ttm_object_file_unref(struct ttm_object_file **p_tfile) int ttm_base_object_init(struct ttm_object_file *tfile, struct ttm_base_object *base, - int shareable, + bool shareable, enum ttm_object_type object_type, void (*refcount_release) (struct ttm_base_object **), void (*ref_obj_release) (struct ttm_base_object *, @@ -242,7 +242,7 @@ struct ttm_base_object *ttm_base_object_lookup(struct ttm_object_file *tfile, int ttm_ref_object_add(struct ttm_object_file *tfile, struct ttm_base_object *base, - enum ttm_ref_type ref_type, int *existed) + enum ttm_ref_type ref_type, bool *existed) { struct drm_open_hash *ht = &tfile->ref_hash[ref_type]; struct ttm_ref_object *ref; @@ -251,7 +251,7 @@ int ttm_ref_object_add(struct ttm_object_file *tfile, int ret = -EINVAL; if (existed != NULL) - *existed = 1; + *existed = true; while (ret == -EINVAL) { read_lock(&tfile->lock); @@ -288,7 +288,7 @@ int ttm_ref_object_add(struct ttm_object_file *tfile, kref_get(&base->refcount); write_unlock(&tfile->lock); if (existed != NULL) - *existed = 0; + *existed = false; break; } diff --git a/linux-core/ttm/ttm_object.h b/linux-core/ttm/ttm_object.h index 53056371..fc154d87 100644 --- a/linux-core/ttm/ttm_object.h +++ b/linux-core/ttm/ttm_object.h @@ -120,7 +120,7 @@ struct ttm_object_device; struct ttm_base_object { struct drm_hash_item hash; enum ttm_object_type object_type; - int shareable; + bool shareable; struct ttm_object_file *tfile; struct kref refcount; void (*refcount_release) (struct ttm_base_object ** base); @@ -144,7 +144,7 @@ struct ttm_base_object { extern int ttm_base_object_init(struct ttm_object_file *tfile, struct ttm_base_object *base, - int shareable, + bool shareable, enum ttm_object_type type, void (*refcount_release) (struct ttm_base_object **), @@ -199,7 +199,7 @@ extern void ttm_base_object_unref(struct ttm_base_object **p_base); */ extern int ttm_ref_object_add(struct ttm_object_file *tfile, struct ttm_base_object *base, - enum ttm_ref_type ref_type, int *existed); + enum ttm_ref_type ref_type, bool *existed); /** * ttm_ref_object_base_unref * diff --git a/linux-core/ttm/ttm_placement_user.c b/linux-core/ttm/ttm_placement_user.c index 353f1cf9..68cbb085 100644 --- a/linux-core/ttm/ttm_placement_user.c +++ b/linux-core/ttm/ttm_placement_user.c @@ -328,7 +328,7 @@ int ttm_pl_synccpu_ioctl(struct ttm_object_file *tfile, void *data) struct ttm_bo_user_object *user_bo; struct ttm_buffer_object *bo; struct ttm_base_object *base; - int existed; + bool existed; int ret; switch (arg->op) { |