From: "Ahmed S. Darwish" <darwish.07@gmail.com>
To: sfrench@samba.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 2.6.20-rc3] CIFS: Remove 2 unneeded kzalloc casts
Date: Sat, 6 Jan 2007 15:17:44 +0200 [thread overview]
Message-ID: <20070106131744.GC19020@Ahmed> (raw)
Hi,
A patch to remove two unnecessary kzalloc casts found
Signed-off-by: Ahmed Darwish <darwish.07@gmail.com>
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c
index aedf683..90f95ed 100644
--- a/fs/cifs/misc.c
+++ b/fs/cifs/misc.c
@@ -71,9 +71,7 @@ sesInfoAlloc(void)
{
struct cifsSesInfo *ret_buf;
- ret_buf =
- (struct cifsSesInfo *) kzalloc(sizeof (struct cifsSesInfo),
- GFP_KERNEL);
+ ret_buf = kzalloc(sizeof (struct cifsSesInfo), GFP_KERNEL);
if (ret_buf) {
write_lock(&GlobalSMBSeslock);
atomic_inc(&sesInfoAllocCount);
@@ -109,9 +107,8 @@ struct cifsTconInfo *
tconInfoAlloc(void)
{
struct cifsTconInfo *ret_buf;
- ret_buf =
- (struct cifsTconInfo *) kzalloc(sizeof (struct cifsTconInfo),
- GFP_KERNEL);
+ ret_buf = kzalloc(sizeof (struct cifsTconInfo),
+ GFP_KERNEL);
if (ret_buf) {
write_lock(&GlobalSMBSeslock);
atomic_inc(&tconInfoAllocCount);
--
Ahmed S. Darwish
http://darwish-07.blogspot.com
next reply other threads:[~2007-01-06 13:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-06 13:17 Ahmed S. Darwish [this message]
2007-01-21 22:56 ` [PATCH 2.6.20-rc3] CIFS: Remove 2 unneeded kzalloc casts Steven French
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=20070106131744.GC19020@Ahmed \
--to=darwish.07@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sfrench@samba.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;
as well as URLs for NNTP newsgroup(s).