Re: [PATCH] amso1100: Add missing memset

2010-04-21 Thread Roland Dreier
I think this patch is actually not needed.  c2_rnic_query() is only
called for the c2dev->props memory, and c2dev is allocated with
ib_alloc_device, which will always zero it out.
-- 
Roland Dreier  || For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/index.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] amso1100: Add missing memset

2010-04-14 Thread Vladimir Sokolovsky
Signed-off-by: Vladimir Sokolovsky 
---
 drivers/infiniband/hw/amso1100/c2_rnic.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/infiniband/hw/amso1100/c2_rnic.c 
b/drivers/infiniband/hw/amso1100/c2_rnic.c
index dd05c48..bac9856 100644
--- a/drivers/infiniband/hw/amso1100/c2_rnic.c
+++ b/drivers/infiniband/hw/amso1100/c2_rnic.c
@@ -155,6 +155,8 @@ static int c2_rnic_query(struct c2_dev *c2dev, struct 
ib_device_attr *props)
if (err)
goto bail2;
 
+   memset(props, 0, sizeof *props);
+
props->fw_ver =
((u64)be32_to_cpu(reply->fw_ver_major) << 32) |
((be32_to_cpu(reply->fw_ver_minor) & 0x) << 16) |
-- 
1.7.0.3

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html