All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Staging: ks7010: Drop memory allocation cast.
@ 2016-09-16 17:38 Sandhya Bankar
  2016-09-16 18:45 ` [Outreachy kernel] " Julia Lawall
  2016-09-17 21:30 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Sandhya Bankar @ 2016-09-16 17:38 UTC (permalink / raw)
  To: outreachy-kernel; +Cc: gregkh, wsa, elfring, sudipm.mukherjee

Drop cast on the result of kzalloc.

The semantic patch that makes this change is as follows:

@@
type T;
@@

- (T *)
  (\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\|
   kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...))


Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
---
 drivers/staging/ks7010/ks7010_sdio.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
index f9aec4f..c40e6c5 100755
--- a/drivers/staging/ks7010/ks7010_sdio.c
+++ b/drivers/staging/ks7010/ks7010_sdio.c
@@ -1147,8 +1147,7 @@ static void ks7010_sdio_remove(struct sdio_func *func)
 		/* send stop request to MAC */
 		{
 			struct hostif_stop_request_t *pp;
-			pp = (struct hostif_stop_request_t *)
-			    kzalloc(hif_align_size(sizeof(*pp)), GFP_KERNEL);
+			pp = kzalloc(hif_align_size(sizeof(*pp)), GFP_KERNEL);
 			if (!pp) {
 				DPRINTK(3, "allocate memory failed..\n");
 				return;	/* to do goto ni suru */
-- 
1.7.1



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

* Re: [Outreachy kernel] [PATCH] Staging: ks7010: Drop memory allocation cast.
  2016-09-16 17:38 [PATCH] Staging: ks7010: Drop memory allocation cast Sandhya Bankar
@ 2016-09-16 18:45 ` Julia Lawall
  2016-09-17 21:30 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2016-09-16 18:45 UTC (permalink / raw)
  To: Sandhya Bankar; +Cc: outreachy-kernel, gregkh, wsa, elfring, sudipm.mukherjee



On Fri, 16 Sep 2016, Sandhya Bankar wrote:

> Drop cast on the result of kzalloc.
>
> The semantic patch that makes this change is as follows:
>
> @@
> type T;
> @@
>
> - (T *)
>   (\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\|
>    kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...))
>
>
> Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>

Acked-by: Julia Lawall <julia.lawall@lip6.fr>

> ---
>  drivers/staging/ks7010/ks7010_sdio.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
> index f9aec4f..c40e6c5 100755
> --- a/drivers/staging/ks7010/ks7010_sdio.c
> +++ b/drivers/staging/ks7010/ks7010_sdio.c
> @@ -1147,8 +1147,7 @@ static void ks7010_sdio_remove(struct sdio_func *func)
>  		/* send stop request to MAC */
>  		{
>  			struct hostif_stop_request_t *pp;
> -			pp = (struct hostif_stop_request_t *)
> -			    kzalloc(hif_align_size(sizeof(*pp)), GFP_KERNEL);
> +			pp = kzalloc(hif_align_size(sizeof(*pp)), GFP_KERNEL);
>  			if (!pp) {
>  				DPRINTK(3, "allocate memory failed..\n");
>  				return;	/* to do goto ni suru */
> --
> 1.7.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20160916173854.GA3176%40sandhya.
> For more options, visit https://groups.google.com/d/optout.
>


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

* Re: [PATCH] Staging: ks7010: Drop memory allocation cast.
  2016-09-16 17:38 [PATCH] Staging: ks7010: Drop memory allocation cast Sandhya Bankar
  2016-09-16 18:45 ` [Outreachy kernel] " Julia Lawall
@ 2016-09-17 21:30 ` Greg KH
  1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2016-09-17 21:30 UTC (permalink / raw)
  To: Sandhya Bankar; +Cc: outreachy-kernel, wsa, elfring, sudipm.mukherjee

On Fri, Sep 16, 2016 at 11:08:54PM +0530, Sandhya Bankar wrote:
> Drop cast on the result of kzalloc.
> 
> The semantic patch that makes this change is as follows:
> 
> @@
> type T;
> @@
> 
> - (T *)
>   (\(kmalloc\|kzalloc\|kcalloc\|kmem_cache_alloc\|kmem_cache_zalloc\|
>    kmem_cache_alloc_node\|kmalloc_node\|kzalloc_node\)(...))
> 
> 
> Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
> Acked-by: Julia Lawall <julia.lawall@lip6.fr>
> ---
>  drivers/staging/ks7010/ks7010_sdio.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/ks7010/ks7010_sdio.c b/drivers/staging/ks7010/ks7010_sdio.c
> index f9aec4f..c40e6c5 100755

All of your patches have the file permissions issue, please fix it up
and resend all of them, I've had to drop all of your pending patches
from my to-apply queue because of this.

thanks,

greg k-h


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

end of thread, other threads:[~2016-09-17 21:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-16 17:38 [PATCH] Staging: ks7010: Drop memory allocation cast Sandhya Bankar
2016-09-16 18:45 ` [Outreachy kernel] " Julia Lawall
2016-09-17 21:30 ` Greg KH

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.