Skip to content

Commit

Permalink
i40iw: Use correct src address in memcpy to rdma stats counters
Browse files Browse the repository at this point in the history
hw_stats is a pointer to i40_iw_dev_stats struct in i40iw_get_hw_stats().
Use hw_stats and not &hw_stats in the memcpy to copy the i40iw device stats
data into rdma_hw_stats counters.

Fixes: b40f475 ("IB/core: Make device counter infrastructure dynamic")

Cc: [email protected] # 4.7+
Signed-off-by: Shiraz Saleem <[email protected]>
Signed-off-by: Faisal Latif <[email protected]>
Signed-off-by: Doug Ledford <[email protected]>
  • Loading branch information
shirazsaleem authored and dledford committed Dec 12, 2016
1 parent 5e58917 commit 91c42b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/i40iw/i40iw_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2646,7 +2646,7 @@ static int i40iw_get_hw_stats(struct ib_device *ibdev,
return -ENOSYS;
}

memcpy(&stats->value[0], &hw_stats, sizeof(*hw_stats));
memcpy(&stats->value[0], hw_stats, sizeof(*hw_stats));

return stats->num_counters;
}
Expand Down

0 comments on commit 91c42b7

Please sign in to comment.