vm_compat_shader_manager is only used for drm_ht_remove_item() within the function. As drm_ht_remove_item() does not need a paremeter drm_open_hash(&man-> shaders), vm_compat_shader_manager(*man) does not have to be passed to this function. Signed-off-by: Masaru Nomura <massa.nomura@xxxxxxxxx> --- drivers/gpu/drm/vmwgfx/vmwgfx_shader.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c b/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c index bbb30c3..2fdbf8e 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_shader.c @@ -532,14 +532,12 @@ int vmw_compat_shader_lookup(struct vmw_compat_shader_manager *man, /** * vmw_compat_shader_free - Free a compat shader. * - * @man: Pointer to the compat shader manager. * @entry: Pointer to a struct vmw_compat_shader. * * Frees a struct vmw_compat_shder entry and drops its reference to the * guest backed shader. */ -static void vmw_compat_shader_free(struct vmw_compat_shader_manager *man, - struct vmw_compat_shader *entry) +static void vmw_compat_shader_free(struct vmw_compat_shader *entry) { list_del(&entry->head); WARN_ON(drm_ht_remove_item(&entry->hash)); @@ -602,7 +600,7 @@ void vmw_compat_shaders_revert(struct vmw_compat_shader_manager *man, list_for_each_entry_safe(entry, next, list, head) { switch (entry->state) { case VMW_COMPAT_ADD: - vmw_compat_shader_free(man, entry); + vmw_compat_shader_free(entry); break; case VMW_COMPAT_DEL: ret = drm_ht_insert_item(&man->shaders, &entry->hash); @@ -649,7 +647,7 @@ int vmw_compat_shader_remove(struct vmw_compat_shader_manager *man, switch (entry->state) { case VMW_COMPAT_ADD: - vmw_compat_shader_free(man, entry); + vmw_compat_shader_free(entry); break; case VMW_COMPAT_COMMITED: drm_ht_remove_item(&entry->hash); @@ -804,7 +802,7 @@ void vmw_compat_shader_man_destroy(struct vmw_compat_shader_manager *man) mutex_lock(&man->dev_priv->cmdbuf_mutex); list_for_each_entry_safe(entry, next, &man->list, head) - vmw_compat_shader_free(man, entry); + vmw_compat_shader_free(entry); drm_ht_remove(&man->shaders); -- 1.9.3 -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html