Lines Matching defs:hash
47 * Generate a hash key from a magic.
50 * \return hash key.
52 * The key is the modulus of the hash table size, #DRM_HASH_SIZE, which must be
66 * Searches in drm_device::magiclist within all files with the same hash key
74 int hash = drm_hash_magic(magic);
78 for (pt = master->magiclist[hash].head; pt; pt = pt->next) {
96 * associated the magic number hash key in drm_device::magiclist, while holding
102 int hash;
108 hash = drm_hash_magic(magic);
118 if (master->magiclist[hash].tail) {
119 master->magiclist[hash].tail->next = entry;
120 master->magiclist[hash].tail = entry;
122 master->magiclist[hash].head = entry;
123 master->magiclist[hash].tail = entry;
137 * number hash key, while holding the drm_device::struct_mutex lock.
143 int hash;
147 hash = drm_hash_magic(magic);
150 for (pt = master->magiclist[hash].head; pt; prev = pt, pt = pt->next) {
152 if (master->magiclist[hash].head == pt) {
153 master->magiclist[hash].head = pt->next;
155 if (master->magiclist[hash].tail == pt) {
156 master->magiclist[hash].tail = prev;