All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 12/15] gpu:No need to cast kmalloc() return values in AMD kfd driver
@ 2015-04-23  5:34 Firo Yang
  2015-04-23  5:54 ` Julia Lawall
  0 siblings, 1 reply; 2+ messages in thread
From: Firo Yang @ 2015-04-23  5:34 UTC (permalink / raw)
  To: kernel-janitors

kmalloc() returns a void pointer - no need to cast it in
drivers/gpu/drm/amd/amdkfd/kfd_process.c::kfd_process_destroy_delayed()

Signed-off-by: Firo Yang <firogm@gmail.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_process.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index 945d622..4d7bc95 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
@@ -203,8 +203,7 @@ static void kfd_process_destroy_delayed(struct rcu_head *rcu)
 
 	mmdrop(p->mm);
 
-	work = (struct kfd_process_release_work *)
-		kmalloc(sizeof(struct kfd_process_release_work), GFP_ATOMIC);
+	work = kmalloc(sizeof(struct kfd_process_release_work), GFP_ATOMIC);
 
 	if (work) {
 		INIT_WORK((struct work_struct *) work, kfd_process_wq_release);
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 12/15] gpu:No need to cast kmalloc() return values in AMD kfd driver
  2015-04-23  5:34 [PATCH 12/15] gpu:No need to cast kmalloc() return values in AMD kfd driver Firo Yang
@ 2015-04-23  5:54 ` Julia Lawall
  0 siblings, 0 replies; 2+ messages in thread
From: Julia Lawall @ 2015-04-23  5:54 UTC (permalink / raw)
  To: kernel-janitors

Again, gpu does not seem like the right information for the subject line.
git log --oneline for this file shows multiple uses of amdkfd.

julia

On Thu, 23 Apr 2015, Firo Yang wrote:

> kmalloc() returns a void pointer - no need to cast it in
> drivers/gpu/drm/amd/amdkfd/kfd_process.c::kfd_process_destroy_delayed()
>
> Signed-off-by: Firo Yang <firogm@gmail.com>
> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_process.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> index 945d622..4d7bc95 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> @@ -203,8 +203,7 @@ static void kfd_process_destroy_delayed(struct rcu_head *rcu)
>
>  	mmdrop(p->mm);
>
> -	work = (struct kfd_process_release_work *)
> -		kmalloc(sizeof(struct kfd_process_release_work), GFP_ATOMIC);
> +	work = kmalloc(sizeof(struct kfd_process_release_work), GFP_ATOMIC);
>
>  	if (work) {
>  		INIT_WORK((struct work_struct *) work, kfd_process_wq_release);
> --
> 2.1.0
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-23  5:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-23  5:34 [PATCH 12/15] gpu:No need to cast kmalloc() return values in AMD kfd driver Firo Yang
2015-04-23  5:54 ` Julia Lawall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.