list_for_each() and the count is not updated or used for stats.
/* Memory management */
drm_map_list_t *maplist; /* Linked list of regions */
- int map_count; /* Number of mappable regions */
drm_map_t **context_sareas;
int max_context;
if(dev->maplist == NULL) return -ENOMEM;
memset(dev->maplist, 0, sizeof(*dev->maplist));
INIT_LIST_HEAD(&dev->maplist->head);
- dev->map_count = 0;
dev->vmalist = NULL;
dev->sigdata.lock = dev->lock.hw_lock = NULL;
idx = map.offset;
down(&dev->struct_sem);
- if (idx < 0 || idx >= dev->map_count) {
+ if (idx < 0) {
up(&dev->struct_sem);
return -EINVAL;
}
/* Memory management */
drm_map_list_t *maplist; /* Linked list of regions */
- int map_count; /* Number of mappable regions */
drm_map_t **context_sareas;
int max_context;
if(dev->maplist == NULL) return -ENOMEM;
memset(dev->maplist, 0, sizeof(*dev->maplist));
INIT_LIST_HEAD(&dev->maplist->head);
- dev->map_count = 0;
dev->vmalist = NULL;
dev->sigdata.lock = dev->lock.hw_lock = NULL;
idx = map.offset;
down(&dev->struct_sem);
- if (idx < 0 || idx >= dev->map_count) {
+ if (idx < 0) {
up(&dev->struct_sem);
return -EINVAL;
}