diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index aa1ac79bccbc0e06dfd32226096b0694600e68a1..cb6b54aebd6fcc0239568cfc5e479f75ce96b324 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c @@ -189,7 +189,6 @@ drm_unset_busid(struct drm_device *dev, kfree(master->unique); master->unique = NULL; master->unique_len = 0; - master->unique_size = 0; } /** diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c index 8efea6b4602ba735076a69a3e8ae431babed1d50..e266927bb9f1daa35f000edb9ddf4e20b43ade9b 100644 --- a/drivers/gpu/drm/drm_pci.c +++ b/drivers/gpu/drm/drm_pci.c @@ -138,7 +138,6 @@ static int drm_pci_set_busid(struct drm_device *dev, struct drm_master *master) return -ENOMEM; master->unique_len = strlen(master->unique); - master->unique_size = master->unique_len + 1; return 0; } @@ -149,8 +148,7 @@ int drm_pci_set_unique(struct drm_device *dev, int domain, bus, slot, func, ret; master->unique_len = u->unique_len; - master->unique_size = u->unique_len + 1; - master->unique = kmalloc(master->unique_size, GFP_KERNEL); + master->unique = kmalloc(master->unique_len + 1, GFP_KERNEL); if (!master->unique) { ret = -ENOMEM; goto err; diff --git a/drivers/gpu/drm/drm_platform.c b/drivers/gpu/drm/drm_platform.c index 0c09ddd50c1577769b9385a598fcce5d302f6459..f197a2b6911a1bec359044e0171772c530161ecc 100644 --- a/drivers/gpu/drm/drm_platform.c +++ b/drivers/gpu/drm/drm_platform.c @@ -82,7 +82,6 @@ static int drm_platform_set_busid(struct drm_device *dev, struct drm_master *mas return -ENOMEM; master->unique_len = strlen(master->unique); - master->unique_size = master->unique_len; return 0; } diff --git a/include/drm/drmP.h b/include/drm/drmP.h index a8b24fcddb8c8c67144d72e6f18438dc1e840e7a..98b1eafebc1c6b258c8c02376dd01175e86d4597 100644 --- a/include/drm/drmP.h +++ b/include/drm/drmP.h @@ -574,7 +574,6 @@ struct drm_gem_object { * @minor: Link back to minor char device we are master for. Immutable. * @unique: Unique identifier: e.g. busid. 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. * @magicfree: List of used authentication tokens. Protected by struct_mutex. * @lock: DRI lock information. @@ -585,7 +584,6 @@ struct drm_master { struct drm_minor *minor; char *unique; int unique_len; - int unique_size; struct drm_open_hash magiclist; struct list_head magicfree; struct drm_lock_data lock;