Skip to content

Commit

Permalink
drm/amdkfd: Remove unnecessary cast in kfree
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Amitoj Kaur Chawla authored and Oded Gabbay committed Jan 28, 2016
1 parent f785d98 commit 642f0f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdkfd/kfd_process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 642f0f2

Please sign in to comment.