summaryrefslogtreecommitdiff
path: root/linux-core/drm_hashtab.c
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2007-07-26 16:58:28 -0700
committerIan Romanick <idr@us.ibm.com>2007-07-26 16:58:28 -0700
commitc561cb4650dc5895acfb3ae00c7ff455be31a860 (patch)
tree65b21097253d216e0385778597031ae288e34023 /linux-core/drm_hashtab.c
parent2bafeb673f14b1e3799bf00817138c0b8211635e (diff)
parent4175dd818110bd10d6d09190d30c271e89202b18 (diff)
Merge branch 'master' of ssh+git://git.freedesktop.org/git/mesa/drm into xgi-0-0-2
Conflicts: linux-core/drmP.h linux-core/drm_scatter.c
Diffstat (limited to 'linux-core/drm_hashtab.c')
-rw-r--r--linux-core/drm_hashtab.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/linux-core/drm_hashtab.c b/linux-core/drm_hashtab.c
index 6f17e114..a8ec8468 100644
--- a/linux-core/drm_hashtab.c
+++ b/linux-core/drm_hashtab.c
@@ -36,7 +36,7 @@
#include "drm_hashtab.h"
#include <linux/hash.h>
-int drm_ht_create(drm_open_hash_t * ht, unsigned int order)
+int drm_ht_create(struct drm_open_hash * ht, unsigned int order)
{
unsigned int i;
@@ -63,9 +63,9 @@ int drm_ht_create(drm_open_hash_t * ht, unsigned int order)
return 0;
}
-void drm_ht_verbose_list(drm_open_hash_t * ht, unsigned long key)
+void drm_ht_verbose_list(struct drm_open_hash * ht, unsigned long key)
{
- drm_hash_item_t *entry;
+ struct drm_hash_item *entry;
struct hlist_head *h_list;
struct hlist_node *list;
unsigned int hashed_key;
@@ -75,15 +75,15 @@ void drm_ht_verbose_list(drm_open_hash_t * ht, unsigned long key)
DRM_DEBUG("Key is 0x%08lx, Hashed key is 0x%08x\n", key, hashed_key);
h_list = &ht->table[hashed_key];
hlist_for_each(list, h_list) {
- entry = hlist_entry(list, drm_hash_item_t, head);
+ entry = hlist_entry(list, struct drm_hash_item, head);
DRM_DEBUG("count %d, key: 0x%08lx\n", count++, entry->key);
}
}
-static struct hlist_node *drm_ht_find_key(drm_open_hash_t * ht,
+static struct hlist_node *drm_ht_find_key(struct drm_open_hash * ht,
unsigned long key)
{
- drm_hash_item_t *entry;
+ struct drm_hash_item *entry;
struct hlist_head *h_list;
struct hlist_node *list;
unsigned int hashed_key;
@@ -91,7 +91,7 @@ static struct hlist_node *drm_ht_find_key(drm_open_hash_t * ht,
hashed_key = hash_long(key, ht->order);
h_list = &ht->table[hashed_key];
hlist_for_each(list, h_list) {
- entry = hlist_entry(list, drm_hash_item_t, head);
+ entry = hlist_entry(list, struct drm_hash_item, head);
if (entry->key == key)
return list;
if (entry->key > key)
@@ -100,9 +100,9 @@ static struct hlist_node *drm_ht_find_key(drm_open_hash_t * ht,
return NULL;
}
-int drm_ht_insert_item(drm_open_hash_t * ht, drm_hash_item_t * item)
+int drm_ht_insert_item(struct drm_open_hash * ht, struct drm_hash_item * item)
{
- drm_hash_item_t *entry;
+ struct drm_hash_item *entry;
struct hlist_head *h_list;
struct hlist_node *list, *parent;
unsigned int hashed_key;
@@ -112,7 +112,7 @@ int drm_ht_insert_item(drm_open_hash_t * ht, drm_hash_item_t * item)
h_list = &ht->table[hashed_key];
parent = NULL;
hlist_for_each(list, h_list) {
- entry = hlist_entry(list, drm_hash_item_t, head);
+ entry = hlist_entry(list, struct drm_hash_item, head);
if (entry->key == key)
return -EINVAL;
if (entry->key > key)
@@ -131,7 +131,7 @@ int drm_ht_insert_item(drm_open_hash_t * ht, drm_hash_item_t * item)
* Just insert an item and return any "bits" bit key that hasn't been
* used before.
*/
-int drm_ht_just_insert_please(drm_open_hash_t * ht, drm_hash_item_t * item,
+int drm_ht_just_insert_please(struct drm_open_hash * ht, struct drm_hash_item * item,
unsigned long seed, int bits, int shift,
unsigned long add)
{
@@ -155,8 +155,8 @@ int drm_ht_just_insert_please(drm_open_hash_t * ht, drm_hash_item_t * item,
return 0;
}
-int drm_ht_find_item(drm_open_hash_t * ht, unsigned long key,
- drm_hash_item_t ** item)
+int drm_ht_find_item(struct drm_open_hash * ht, unsigned long key,
+ struct drm_hash_item ** item)
{
struct hlist_node *list;
@@ -164,11 +164,11 @@ int drm_ht_find_item(drm_open_hash_t * ht, unsigned long key,
if (!list)
return -EINVAL;
- *item = hlist_entry(list, drm_hash_item_t, head);
+ *item = hlist_entry(list, struct drm_hash_item, head);
return 0;
}
-int drm_ht_remove_key(drm_open_hash_t * ht, unsigned long key)
+int drm_ht_remove_key(struct drm_open_hash * ht, unsigned long key)
{
struct hlist_node *list;
@@ -181,14 +181,14 @@ int drm_ht_remove_key(drm_open_hash_t * ht, unsigned long key)
return -EINVAL;
}
-int drm_ht_remove_item(drm_open_hash_t * ht, drm_hash_item_t * item)
+int drm_ht_remove_item(struct drm_open_hash * ht, struct drm_hash_item * item)
{
hlist_del_init(&item->head);
ht->fill--;
return 0;
}
-void drm_ht_remove(drm_open_hash_t * ht)
+void drm_ht_remove(struct drm_open_hash * ht)
{
if (ht->table) {
if (ht->use_vmalloc)