drm: remove FALSE/TRUE that snuck in with simple memory manager changes.

Thanks to Andrew Morton for pointing these out, I've fixed a few his patch
missed.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
This commit is contained in:
Andrew Morton 2006-08-14 11:35:15 +10:00 коммит произвёл Dave Airlie
Родитель c29b669caa
Коммит a1d0fcf5a1
6 изменённых файлов: 19 добавлений и 19 удалений

Просмотреть файл

@ -248,7 +248,7 @@ static int drm_addmap_core(drm_device_t * dev, unsigned int offset,
/* We do it here so that dev->struct_mutex protects the increment */
user_token = (map->type == _DRM_SHM) ? (unsigned long)map->handle :
map->offset;
ret = drm_map_handle(dev, &list->hash, user_token, FALSE);
ret = drm_map_handle(dev, &list->hash, user_token, 0);
if (ret) {
drm_free(map, sizeof(*map), DRM_MEM_MAPS);
drm_free(list, sizeof(*list), DRM_MEM_MAPS);

Просмотреть файл

@ -54,7 +54,7 @@ drm_mm_node_t *drm_mm_get_block(drm_mm_node_t * parent,
if (parent->size == size) {
list_del_init(&parent->fl_entry);
parent->free = FALSE;
parent->free = 0;
return parent;
} else {
child = (drm_mm_node_t *) drm_alloc(sizeof(*child), DRM_MEM_MM);
@ -64,7 +64,7 @@ drm_mm_node_t *drm_mm_get_block(drm_mm_node_t * parent,
INIT_LIST_HEAD(&child->ml_entry);
INIT_LIST_HEAD(&child->fl_entry);
child->free = FALSE;
child->free = 0;
child->size = size;
child->start = parent->start;
@ -89,13 +89,13 @@ void drm_mm_put_block(drm_mm_t * mm, drm_mm_node_t * cur)
drm_mm_node_t *prev_node = NULL;
drm_mm_node_t *next_node;
int merged = FALSE;
int merged = 0;
if (cur_head->prev != root_head) {
prev_node = list_entry(cur_head->prev, drm_mm_node_t, ml_entry);
if (prev_node->free) {
prev_node->size += cur->size;
merged = TRUE;
merged = 1;
}
}
if (cur_head->next != root_head) {
@ -110,12 +110,12 @@ void drm_mm_put_block(drm_mm_t * mm, drm_mm_node_t * cur)
} else {
next_node->size += cur->size;
next_node->start = cur->start;
merged = TRUE;
merged = 1;
}
}
}
if (!merged) {
cur->free = TRUE;
cur->free = 1;
list_add(&cur->fl_entry, &list_root->fl_entry);
} else {
list_del(&cur->ml_entry);
@ -169,7 +169,7 @@ int drm_mm_init(drm_mm_t * mm, unsigned long start, unsigned long size)
child->start = start;
child->size = size;
child->free = TRUE;
child->free = 1;
list_add(&child->fl_entry, &mm->root_node.fl_entry);
list_add(&child->ml_entry, &mm->root_node.ml_entry);

Просмотреть файл

@ -91,7 +91,7 @@ static void *drm_sman_mm_allocate(void *private, unsigned long size,
drm_mm_t *mm = (drm_mm_t *) private;
drm_mm_node_t *tmp;
tmp = drm_mm_search_free(mm, size, alignment, TRUE);
tmp = drm_mm_search_free(mm, size, alignment, 1);
if (!tmp) {
return NULL;
}

Просмотреть файл

@ -148,7 +148,7 @@ extern drm_memblock_item_t *drm_sman_alloc(drm_sman_t * sman,
extern int drm_sman_free_key(drm_sman_t * sman, unsigned int key);
/*
* returns TRUE iff there are no stale memory blocks associated with this owner.
* returns 1 iff there are no stale memory blocks associated with this owner.
* Typically called to determine if we need to idle the hardware and call
* drm_sman_owner_cleanup. If there are no stale memory blocks, it removes all
* resources associated with owner.

Просмотреть файл

@ -111,7 +111,7 @@ static int sis_fb_init(DRM_IOCTL_ARGS)
return ret;
}
dev_priv->vram_initialized = TRUE;
dev_priv->vram_initialized = 1;
dev_priv->vram_offset = fb.offset;
mutex_unlock(&dev->struct_mutex);
@ -133,7 +133,7 @@ static int sis_drm_alloc(drm_device_t * dev, drm_file_t * priv,
mutex_lock(&dev->struct_mutex);
if (FALSE == ((pool == 0) ? dev_priv->vram_initialized :
if (0 == ((pool == 0) ? dev_priv->vram_initialized :
dev_priv->agp_initialized)) {
DRM_ERROR
("Attempt to allocate from uninitialized memory manager.\n");
@ -211,7 +211,7 @@ static int sis_ioctl_agp_init(DRM_IOCTL_ARGS)
return ret;
}
dev_priv->agp_initialized = TRUE;
dev_priv->agp_initialized = 1;
dev_priv->agp_offset = agp.offset;
mutex_unlock(&dev->struct_mutex);
@ -284,7 +284,7 @@ int sis_idle(drm_device_t *dev)
if (time_after_eq(jiffies, end)) {
DRM_ERROR("Graphics engine idle timeout. "
"Disabling idle check\n");
dev_priv->idle_fault = TRUE;
dev_priv->idle_fault = 1;
}
/*
@ -305,8 +305,8 @@ void sis_lastclose(struct drm_device *dev)
mutex_lock(&dev->struct_mutex);
drm_sman_cleanup(&dev_priv->sman);
dev_priv->vram_initialized = FALSE;
dev_priv->agp_initialized = FALSE;
dev_priv->vram_initialized = 0;
dev_priv->agp_initialized = 0;
dev_priv->mmio = NULL;
mutex_unlock(&dev->struct_mutex);
}

Просмотреть файл

@ -116,8 +116,8 @@ void via_lastclose(struct drm_device *dev)
mutex_lock(&dev->struct_mutex);
drm_sman_cleanup(&dev_priv->sman);
dev_priv->vram_initialized = FALSE;
dev_priv->agp_initialized = FALSE;
dev_priv->vram_initialized = 0;
dev_priv->agp_initialized = 0;
mutex_unlock(&dev->struct_mutex);
}
@ -139,7 +139,7 @@ int via_mem_alloc(DRM_IOCTL_ARGS)
return DRM_ERR(EINVAL);
}
mutex_lock(&dev->struct_mutex);
if (FALSE == ((mem.type == VIA_MEM_VIDEO) ? dev_priv->vram_initialized :
if (0 == ((mem.type == VIA_MEM_VIDEO) ? dev_priv->vram_initialized :
dev_priv->agp_initialized)) {
DRM_ERROR
("Attempt to allocate from uninitialized memory manager.\n");