All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpu: drm: amd: amdkfd: Remove unnecessary cast in kfree
@ 2016-01-25 17:33 Amitoj Kaur Chawla
  2016-01-28 12:41   ` Oded Gabbay
  0 siblings, 1 reply; 5+ messages in thread
From: Amitoj Kaur Chawla @ 2016-01-25 17:33 UTC (permalink / raw)
  To: oded.gabbay, airlied, dri-devel, linux-kernel; +Cc: julia.lawall

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>
---
 drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
index 9be0070..a902ae0 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
+++ b/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)
-- 
1.9.1

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

* Re: [PATCH] gpu: drm: amd: amdkfd: Remove unnecessary cast in kfree
  2016-01-25 17:33 [PATCH] gpu: drm: amd: amdkfd: Remove unnecessary cast in kfree Amitoj Kaur Chawla
@ 2016-01-28 12:41   ` Oded Gabbay
  0 siblings, 0 replies; 5+ messages in thread
From: Oded Gabbay @ 2016-01-28 12:41 UTC (permalink / raw)
  To: Amitoj Kaur Chawla
  Cc: David Airlie, Maling list - DRI developers,
	Linux-Kernel@Vger. Kernel. Org, julia.lawall

On Mon, Jan 25, 2016 at 7:33 PM, Amitoj Kaur Chawla
<amitoj1606@gmail.com> wrote:
> 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>
> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> index 9be0070..a902ae0 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> +++ b/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)
> --
> 1.9.1
>

Thanks!
Applied to my -fixes tree.
For future reference, use "drm/amdkfd: ..." as the prefix of the
subject line. I fixed it for this patch.

       Oded

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

* Re: [PATCH] gpu: drm: amd: amdkfd: Remove unnecessary cast in kfree
@ 2016-01-28 12:41   ` Oded Gabbay
  0 siblings, 0 replies; 5+ messages in thread
From: Oded Gabbay @ 2016-01-28 12:41 UTC (permalink / raw)
  To: Amitoj Kaur Chawla
  Cc: julia.lawall, Linux-Kernel@Vger. Kernel. Org,
	Maling list - DRI developers

On Mon, Jan 25, 2016 at 7:33 PM, Amitoj Kaur Chawla
<amitoj1606@gmail.com> wrote:
> 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>
> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_process.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.c b/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> index 9be0070..a902ae0 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_process.c
> +++ b/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)
> --
> 1.9.1
>

Thanks!
Applied to my -fixes tree.
For future reference, use "drm/amdkfd: ..." as the prefix of the
subject line. I fixed it for this patch.

       Oded
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] gpu: drm: amd: amdkfd: Remove unnecessary cast in kfree
  2016-01-28 12:41   ` Oded Gabbay
@ 2016-01-28 12:50     ` Amitoj Kaur Chawla
  -1 siblings, 0 replies; 5+ messages in thread
From: Amitoj Kaur Chawla @ 2016-01-28 12:50 UTC (permalink / raw)
  To: Oded Gabbay
  Cc: David Airlie, Maling list - DRI developers,
	Linux-Kernel@Vger. Kernel. Org, Julia Lawall

On Thu, Jan 28, 2016 at 6:11 PM, Oded Gabbay <oded.gabbay@gmail.com> wrote:
> Thanks!
> Applied to my -fixes tree.
> For future reference, use "drm/amdkfd: ..." as the prefix of the
> subject line. I fixed it for this patch.
>
>        Oded

Will do.

Thanks,
Amitoj

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

* Re: [PATCH] gpu: drm: amd: amdkfd: Remove unnecessary cast in kfree
@ 2016-01-28 12:50     ` Amitoj Kaur Chawla
  0 siblings, 0 replies; 5+ messages in thread
From: Amitoj Kaur Chawla @ 2016-01-28 12:50 UTC (permalink / raw)
  To: Oded Gabbay
  Cc: David Airlie, Maling list - DRI developers,
	Linux-Kernel@Vger. Kernel. Org, Julia Lawall

On Thu, Jan 28, 2016 at 6:11 PM, Oded Gabbay <oded.gabbay@gmail.com> wrote:
> Thanks!
> Applied to my -fixes tree.
> For future reference, use "drm/amdkfd: ..." as the prefix of the
> subject line. I fixed it for this patch.
>
>        Oded

Will do.

Thanks,
Amitoj

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

end of thread, other threads:[~2016-01-28 12:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-25 17:33 [PATCH] gpu: drm: amd: amdkfd: Remove unnecessary cast in kfree Amitoj Kaur Chawla
2016-01-28 12:41 ` Oded Gabbay
2016-01-28 12:41   ` Oded Gabbay
2016-01-28 12:50   ` Amitoj Kaur Chawla
2016-01-28 12:50     ` Amitoj Kaur Chawla

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.