From: Roland Dreier <rolandd@cisco.com>
To: linux-kernel@vger.kernel.org, openib-general@openib.org
Subject: [git patch review 3/7] [IPoIB] remove unneeded initializations to 0
Date: Thu, 03 Nov 2005 23:10:59 +0000 [thread overview]
Message-ID: <1131059459423-3dc7f03665037bf0@cisco.com> (raw)
In-Reply-To: <1131059459423-f6e7ac335ed94eef@cisco.com>
Shrink our source and .text a little by removing a few assignments of
NULL and 0 to memory that is already cleared as part of the allocation.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
---
drivers/infiniband/ulp/ipoib/ipoib_main.c | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
applies-to: 7463446a05b5e9a5d2fc400da0be8d4a6c2ff6f1
21a384897d48c116b879924c3dd9e96f6f1e764b
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 8b67db8..ce02962 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -356,18 +356,15 @@ static struct ipoib_path *path_rec_creat
struct ipoib_dev_priv *priv = netdev_priv(dev);
struct ipoib_path *path;
- path = kmalloc(sizeof *path, GFP_ATOMIC);
+ path = kzalloc(sizeof *path, GFP_ATOMIC);
if (!path)
return NULL;
- path->dev = dev;
- path->pathrec.dlid = 0;
- path->ah = NULL;
+ path->dev = dev;
skb_queue_head_init(&path->queue);
INIT_LIST_HEAD(&path->neigh_list);
- path->query = NULL;
init_completion(&path->done);
memcpy(path->pathrec.dgid.raw, gid->raw, sizeof (union ib_gid));
@@ -800,10 +797,6 @@ static void ipoib_setup(struct net_devic
dev->watchdog_timeo = HZ;
- dev->rebuild_header = NULL;
- dev->set_mac_address = NULL;
- dev->header_cache_update = NULL;
-
dev->flags |= IFF_BROADCAST | IFF_MULTICAST;
/*
---
0.99.9
next prev parent reply other threads:[~2005-11-03 23:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-03 23:10 [git patch review 1/7] [IB] ucm: 32/64 compatibility fixes Roland Dreier
2005-11-03 23:10 ` [git patch review 2/7] [IB] kzalloc() conversions Roland Dreier
2005-11-03 23:10 ` Roland Dreier [this message]
2005-11-03 23:10 ` [git patch review 4/7] [IPoIB] don't compile debug code if debugging isn't enabled Roland Dreier
2005-11-03 23:10 ` [git patch review 5/7] [IB] mthca: fix format of FW version Roland Dreier
2005-11-03 23:10 ` [git patch review 6/7] [IB] umad: fix hot remove of IB devices Roland Dreier
2005-11-03 23:10 ` [git patch review 7/7] [IB] mthca: check P_Key index in modify QP Roland Dreier
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=1131059459423-3dc7f03665037bf0@cisco.com \
--to=rolandd@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=openib-general@openib.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