]> err.no Git - linux-2.6/commitdiff
drm: remove FALSE/TRUE that snuck in with simple memory manager changes.
authorAndrew Morton <akpm@osdl.org>
Mon, 14 Aug 2006 01:35:15 +0000 (11:35 +1000)
committerDave Airlie <airlied@linux.ie>
Thu, 21 Sep 2006 19:32:32 +0000 (05:32 +1000)
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>
drivers/char/drm/drm_bufs.c
drivers/char/drm/drm_mm.c
drivers/char/drm/drm_sman.c
drivers/char/drm/drm_sman.h
drivers/char/drm/sis_mm.c
drivers/char/drm/via_mm.c

index dde612091005e7f7679000593346a5cd09d9e795..71d2e09176361144e693190db4c8bc6372d1716b 100644 (file)
@@ -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);
index c55ed45a8944862c780eab578f42df82e2c7187c..617526bd5b0ca6703b365ca07e9a2187ef8342f5 100644 (file)
@@ -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);
index baba913989119fd2e522b6acf40c6238a86b9441..b92f0ee74b39c198b8373f0ee73adb4b3598f5c3 100644 (file)
@@ -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;
        }
index 7c48360f114e1d83d377e945f3f0205d58a5f43c..ddc732a1bf2730efd5d27c31613576ca1a6945b9 100644 (file)
@@ -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.
index 3041c5b42d5684666cecb37840180695ebe13ed4..1b21e324d04e4d67cef9f550d458aec30a79b7ce 100644 (file)
@@ -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);
 }
index 9d9237ef94482c0a6f98940df14b19a13ef0a46f..d6c08e1d768fb2b30d0d59e7c5f00af5caf77726 100644 (file)
@@ -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");