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

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.