lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1403646734-2838-4-git-send-email-massa.nomura@gmail.com>
Date:	Tue, 24 Jun 2014 22:52:14 +0100
From:	Masaru Nomura <massa.nomura@...il.com>
To:	airlied@...ux.ie
Cc:	thellstrom@...are.com, dri-devel@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
	Masaru Nomura <massa.nomura@...il.com>
Subject: [PATCH 3/3] gpu: drm: vmwgfx: Remove unnecessary parameter from vmw_compat_shader_free()

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@...il.com>
---
 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 linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ