diff options
author | Shiraz Saleem <shiraz.saleem@intel.com> | 2016-11-11 11:55:41 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-09 02:32:24 -0500 |
commit | 7cc603e9a828e205c393e49711980c9e9e3938ba (patch) | |
tree | 85c08d62c31b18188166222bd0e6f1f620f10f68 /drivers/infiniband | |
parent | 6195cd1a9628281a10a7132ae0f664a496b2b33c (diff) |
i40iw: Use correct src address in memcpy to rdma stats counters
commit 91c42b72f8e8b45961ff05a05009b644e6316ca2 upstream.
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: b40f4757daa1 ("IB/core: Make device counter infrastructure dynamic")
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/i40iw/i40iw_verbs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/i40iw/i40iw_verbs.c b/drivers/infiniband/hw/i40iw/i40iw_verbs.c index 6329c971c22f..4b892ca2b13a 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_verbs.c +++ b/drivers/infiniband/hw/i40iw/i40iw_verbs.c | |||
@@ -2501,7 +2501,7 @@ static int i40iw_get_hw_stats(struct ib_device *ibdev, | |||
2501 | return -ENOSYS; | 2501 | return -ENOSYS; |
2502 | } | 2502 | } |
2503 | 2503 | ||
2504 | memcpy(&stats->value[0], &hw_stats, sizeof(*hw_stats)); | 2504 | memcpy(&stats->value[0], hw_stats, sizeof(*hw_stats)); |
2505 | 2505 | ||
2506 | return stats->num_counters; | 2506 | return stats->num_counters; |
2507 | } | 2507 | } |