Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=99d4f22e91d26e0f8b113bf7fde65a335d36ad6b
Commit:     99d4f22e91d26e0f8b113bf7fde65a335d36ad6b
Parent:     66efc5a7e3061c3597ac43a8bb1026488d57e66b
Author:     Roland Dreier <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 10 08:00:47 2007 -0800
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Sat Feb 10 08:00:47 2007 -0800

    IB/mthca: Use correct structure size in call to memset()
    
    When clearing the ib_ah_attr parameter in to_ib_ah_attr(), use sizeof
    *ib_ah_attr instead of sizeof *path.
    
    Pointed out by Jack Morgenstein <[EMAIL PROTECTED]>.
    
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
---
 drivers/infiniband/hw/mthca/mthca_qp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/hw/mthca/mthca_qp.c 
b/drivers/infiniband/hw/mthca/mthca_qp.c
index 5f5214c..224c93d 100644
--- a/drivers/infiniband/hw/mthca/mthca_qp.c
+++ b/drivers/infiniband/hw/mthca/mthca_qp.c
@@ -399,7 +399,7 @@ static int to_ib_qp_access_flags(int mthca_flags)
 static void to_ib_ah_attr(struct mthca_dev *dev, struct ib_ah_attr *ib_ah_attr,
                                struct mthca_qp_path *path)
 {
-       memset(ib_ah_attr, 0, sizeof *path);
+       memset(ib_ah_attr, 0, sizeof *ib_ah_attr);
        ib_ah_attr->port_num      = (be32_to_cpu(path->port_pkey) >> 24) & 0x3;
 
        if (ib_ah_attr->port_num == 0 || ib_ah_attr->port_num > 
dev->limits.num_ports)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to