From: "Geyslan G. Bem" <geyslan@gmail.com>
To: lidza.louina@gmail.com
Cc: gregkh@linuxfoundation.org,
driverdev-devel@linuxdriverproject.org,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
kernel-br@googlegroups.com, "Geyslan G. Bem" <geyslan@gmail.com>
Subject: [PATCH] drivers: staging: dgnc: Remove useless casting in dgnc_driver.c
Date: Wed, 16 Oct 2013 12:57:35 -0300 [thread overview]
Message-ID: <1381939056-27898-1-git-send-email-geyslan@gmail.com> (raw)
Casting (void *) value returned by kzalloc is useless
as mentioned in Documentation/CodingStyle, Chap 14.
Signed-off-by: Geyslan G. Bem <geyslan@gmail.com>
---
drivers/staging/dgnc/dgnc_driver.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c
index 71d2b83..7f31ab5 100644
--- a/drivers/staging/dgnc/dgnc_driver.c
+++ b/drivers/staging/dgnc/dgnc_driver.c
@@ -498,16 +498,14 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
unsigned long flags;
/* get the board structure and prep it */
- brd = dgnc_Board[dgnc_NumBoards] =
- (struct board_t *) kzalloc(sizeof(struct board_t), GFP_KERNEL);
+ brd = dgnc_Board[dgnc_NumBoards] = kzalloc(sizeof(struct board_t), GFP_KERNEL);
if (!brd) {
APR(("memory allocation for board structure failed\n"));
return(-ENOMEM);
}
/* make a temporary message buffer for the boot messages */
- brd->msgbuf = brd->msgbuf_head =
- (char *) kzalloc(sizeof(char) * 8192, GFP_KERNEL);
+ brd->msgbuf = brd->msgbuf_head = kzalloc(sizeof(char) * 8192, GFP_KERNEL);
if (!brd->msgbuf) {
kfree(brd);
APR(("memory allocation for board msgbuf failed\n"));
--
1.8.4
next reply other threads:[~2013-10-16 16:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-16 15:57 Geyslan G. Bem [this message]
2013-10-16 15:57 ` [PATCH] drivers: staging: dgap: Remove useless casting in dgap_parse.c Geyslan G. Bem
2013-10-17 10:14 ` Geyslan Gregório Bem
2013-10-16 19:39 ` [PATCH] drivers: staging: dgnc: Remove useless casting in dgnc_driver.c Greg KH
2013-10-16 23:09 ` Geyslan Gregório Bem
2013-10-17 10:07 ` Geyslan Gregório Bem
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1381939056-27898-1-git-send-email-geyslan@gmail.com \
--to=geyslan@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-br@googlegroups.com \
--cc=lidza.louina@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome