forked from Minki/linux
drm: drop unused drm_master->unique_size
This field is unused and there is really no reason to optimize unique-allocations. Drop it. Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
d0a39164b6
commit
1e444be0ef
@ -189,7 +189,6 @@ drm_unset_busid(struct drm_device *dev,
|
|||||||
kfree(master->unique);
|
kfree(master->unique);
|
||||||
master->unique = NULL;
|
master->unique = NULL;
|
||||||
master->unique_len = 0;
|
master->unique_len = 0;
|
||||||
master->unique_size = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -138,7 +138,6 @@ static int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master)
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
master->unique_len = strlen(master->unique);
|
master->unique_len = strlen(master->unique);
|
||||||
master->unique_size = master->unique_len + 1;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,8 +148,7 @@ int drm_pci_set_unique(struct drm_device *dev,
|
|||||||
int domain, bus, slot, func, ret;
|
int domain, bus, slot, func, ret;
|
||||||
|
|
||||||
master->unique_len = u->unique_len;
|
master->unique_len = u->unique_len;
|
||||||
master->unique_size = u->unique_len + 1;
|
master->unique = kmalloc(master->unique_len + 1, GFP_KERNEL);
|
||||||
master->unique = kmalloc(master->unique_size, GFP_KERNEL);
|
|
||||||
if (!master->unique) {
|
if (!master->unique) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto err;
|
goto err;
|
||||||
|
@ -82,7 +82,6 @@ static int drm_platform_set_busid(struct drm_device *dev, struct drm_master *mas
|
|||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
master->unique_len = strlen(master->unique);
|
master->unique_len = strlen(master->unique);
|
||||||
master->unique_size = master->unique_len;
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -574,7 +574,6 @@ struct drm_gem_object {
|
|||||||
* @minor: Link back to minor char device we are master for. Immutable.
|
* @minor: Link back to minor char device we are master for. Immutable.
|
||||||
* @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.
|
||||||
* @unique_size: Amount allocated. 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.
|
* @magicfree: List of used authentication tokens. Protected by struct_mutex.
|
||||||
* @lock: DRI lock information.
|
* @lock: DRI lock information.
|
||||||
@ -585,7 +584,6 @@ struct drm_master {
|
|||||||
struct drm_minor *minor;
|
struct drm_minor *minor;
|
||||||
char *unique;
|
char *unique;
|
||||||
int unique_len;
|
int unique_len;
|
||||||
int unique_size;
|
|
||||||
struct drm_open_hash magiclist;
|
struct drm_open_hash magiclist;
|
||||||
struct list_head magicfree;
|
struct list_head magicfree;
|
||||||
struct drm_lock_data lock;
|
struct drm_lock_data lock;
|
||||||
|
Loading…
Reference in New Issue
Block a user