diff options
author | Roland Dreier <rolandd@cisco.com> | 2005-11-02 13:07:59 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2005-11-02 13:07:59 -0500 |
commit | 21a384897d48c116b879924c3dd9e96f6f1e764b (patch) | |
tree | 3179960b8e0f3ccb4feff19eb5582298d48324a0 | |
parent | de6eb66b56d9df5ce6bd254994f05e065214e8cd (diff) |
[IPoIB] remove unneeded initializations to 0
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>
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_main.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 8b67db868306..ce0296273e76 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_create(struct net_device *dev, | |||
356 | struct ipoib_dev_priv *priv = netdev_priv(dev); | 356 | struct ipoib_dev_priv *priv = netdev_priv(dev); |
357 | struct ipoib_path *path; | 357 | struct ipoib_path *path; |
358 | 358 | ||
359 | path = kmalloc(sizeof *path, GFP_ATOMIC); | 359 | path = kzalloc(sizeof *path, GFP_ATOMIC); |
360 | if (!path) | 360 | if (!path) |
361 | return NULL; | 361 | return NULL; |
362 | 362 | ||
363 | path->dev = dev; | 363 | path->dev = dev; |
364 | path->pathrec.dlid = 0; | ||
365 | path->ah = NULL; | ||
366 | 364 | ||
367 | skb_queue_head_init(&path->queue); | 365 | skb_queue_head_init(&path->queue); |
368 | 366 | ||
369 | INIT_LIST_HEAD(&path->neigh_list); | 367 | INIT_LIST_HEAD(&path->neigh_list); |
370 | path->query = NULL; | ||
371 | init_completion(&path->done); | 368 | init_completion(&path->done); |
372 | 369 | ||
373 | memcpy(path->pathrec.dgid.raw, gid->raw, sizeof (union ib_gid)); | 370 | memcpy(path->pathrec.dgid.raw, gid->raw, sizeof (union ib_gid)); |
@@ -800,10 +797,6 @@ static void ipoib_setup(struct net_device *dev) | |||
800 | 797 | ||
801 | dev->watchdog_timeo = HZ; | 798 | dev->watchdog_timeo = HZ; |
802 | 799 | ||
803 | dev->rebuild_header = NULL; | ||
804 | dev->set_mac_address = NULL; | ||
805 | dev->header_cache_update = NULL; | ||
806 | |||
807 | dev->flags |= IFF_BROADCAST | IFF_MULTICAST; | 800 | dev->flags |= IFF_BROADCAST | IFF_MULTICAST; |
808 | 801 | ||
809 | /* | 802 | /* |