More bool conversion.

This commit is contained in:
Thomas Hellstrom 2009-02-13 21:58:33 +01:00
parent a520b3ed01
commit 8be10a790e
7 changed files with 15 additions and 15 deletions

View file

@ -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);
}

View file

@ -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;
};
/**

View file

@ -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))

View file

@ -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);

View file

@ -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;
}

View file

@ -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
*

View file

@ -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) {