Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit acab18b5 authored by David Herrmann's avatar David Herrmann Committed by Daniel Vetter
Browse files

drm: drop unused 'magicfree' list



This list is write-only. It's never used for read-access, so no reason to
keep it around. Drop it!

Signed-off-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent ed181703
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -37,7 +37,6 @@
#include "drm_internal.h"
#include "drm_internal.h"


struct drm_magic_entry {
struct drm_magic_entry {
	struct list_head head;
	struct drm_hash_item hash_item;
	struct drm_hash_item hash_item;
	struct drm_file *priv;
	struct drm_file *priv;
};
};
@@ -93,7 +92,6 @@ static int drm_add_magic(struct drm_master *master, struct drm_file *priv,
	entry->hash_item.key = (unsigned long)magic;
	entry->hash_item.key = (unsigned long)magic;
	mutex_lock(&dev->struct_mutex);
	mutex_lock(&dev->struct_mutex);
	drm_ht_insert_item(&master->magiclist, &entry->hash_item);
	drm_ht_insert_item(&master->magiclist, &entry->hash_item);
	list_add_tail(&entry->head, &master->magicfree);
	mutex_unlock(&dev->struct_mutex);
	mutex_unlock(&dev->struct_mutex);


	return 0;
	return 0;
@@ -123,7 +121,6 @@ int drm_remove_magic(struct drm_master *master, drm_magic_t magic)
	}
	}
	pt = drm_hash_entry(hash, struct drm_magic_entry, hash_item);
	pt = drm_hash_entry(hash, struct drm_magic_entry, hash_item);
	drm_ht_remove_item(&master->magiclist, hash);
	drm_ht_remove_item(&master->magiclist, hash);
	list_del(&pt->head);
	mutex_unlock(&dev->struct_mutex);
	mutex_unlock(&dev->struct_mutex);


	kfree(pt);
	kfree(pt);
+0 −1
Original line number Original line Diff line number Diff line
@@ -109,7 +109,6 @@ struct drm_master *drm_master_create(struct drm_minor *minor)
		kfree(master);
		kfree(master);
		return NULL;
		return NULL;
	}
	}
	INIT_LIST_HEAD(&master->magicfree);
	master->minor = minor;
	master->minor = minor;


	return master;
	return master;
+0 −2
Original line number Original line Diff line number Diff line
@@ -356,7 +356,6 @@ struct drm_lock_data {
 * @unique: Unique identifier: e.g. busid. Protected by drm_global_mutex.
 * @unique: Unique identifier: e.g. busid. Protected by drm_global_mutex.
 * @unique_len: Length of unique field. Protected by drm_global_mutex.
 * @unique_len: Length of unique field. Protected by drm_global_mutex.
 * @magiclist: Hash of used authentication tokens. Protected by struct_mutex.
 * @magiclist: Hash of used authentication tokens. Protected by struct_mutex.
 * @magicfree: List of used authentication tokens. Protected by struct_mutex.
 * @lock: DRI lock information.
 * @lock: DRI lock information.
 * @driver_priv: Pointer to driver-private information.
 * @driver_priv: Pointer to driver-private information.
 */
 */
@@ -366,7 +365,6 @@ struct drm_master {
	char *unique;
	char *unique;
	int unique_len;
	int unique_len;
	struct drm_open_hash magiclist;
	struct drm_open_hash magiclist;
	struct list_head magicfree;
	struct drm_lock_data lock;
	struct drm_lock_data lock;
	void *driver_priv;
	void *driver_priv;
};
};