public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: dgap: remove useless cast on kzalloc()
@ 2014-03-06  6:17 Daeseok Youn
  0 siblings, 0 replies; 2+ messages in thread
From: Daeseok Youn @ 2014-03-06  6:17 UTC (permalink / raw)
  To: lidza.louina, gregkh; +Cc: driverdev-devel, devel, linux-kernel


coccinelle warning:
drivers/staging/dgap/dgap.c:782:3-7: WARNING:
 casting value returned by k[cmz]alloc to (char *) is useless.
drivers/staging/dgap/dgap.c:776:2-16: WARNING:
 casting value returned by k[cmz]alloc to (struct board_t *) is useless.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
 drivers/staging/dgap/dgap.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c
index cbce457..1adcd13 100644
--- a/drivers/staging/dgap/dgap.c
+++ b/drivers/staging/dgap/dgap.c
@@ -773,13 +773,13 @@ static int dgap_found_board(struct pci_dev *pdev, int id)
 
 	/* get the board structure and prep it */
 	brd = dgap_Board[dgap_NumBoards] =
-	(struct board_t *) kzalloc(sizeof(struct board_t), GFP_KERNEL);
+		kzalloc(sizeof(struct board_t), GFP_KERNEL);
 	if (!brd)
 		return -ENOMEM;
 
 	/* make a temporary message buffer for the boot messages */
 	brd->msgbuf = brd->msgbuf_head =
-		(char *) kzalloc(sizeof(char) * 8192, GFP_KERNEL);
+		kzalloc(sizeof(char) * 8192, GFP_KERNEL);
 	if (!brd->msgbuf) {
 		kfree(brd);
 		return -ENOMEM;
-- 
1.7.4.4



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

end of thread, other threads:[~2014-03-06 13:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <920618656.203780.1394086679844.JavaMail.root@mx2.compro.net>
2014-03-06 12:57 ` [PATCH] staging: dgap: remove useless cast on kzalloc() Mark Hounschell
2014-03-06  6:17 Daeseok Youn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox