Przeglądaj źródła

drm/amdkfd: Remove unnecessary cast in kfree

Remove an unnecassary cast in the argument to kfree.

Found using Coccinelle. The semantic patch used to find this is as follows:

//<smpl>
@@
type T;
expression *f;
@@

- kfree((T *)(f));
+ kfree(f);
//</smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Amitoj Kaur Chawla 9 lat temu
rodzic
commit
642f0f2a15
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      drivers/gpu/drm/amd/amdkfd/kfd_process.c

+ 1 - 1
drivers/gpu/drm/amd/amdkfd/kfd_process.c

@@ -194,7 +194,7 @@ static void kfd_process_wq_release(struct work_struct *work)
 
 	kfree(p);
 
-	kfree((void *)work);
+	kfree(work);
 }
 
 static void kfd_process_destroy_delayed(struct rcu_head *rcu)