diff options
author | Jiri Pirko <jiri@mellanox.com> | 2019-08-09 16:27:15 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-09 21:21:46 +0300 |
commit | 3a5e523479c49b082b8ac291a1a9fbd035c06df5 (patch) | |
tree | 948b6c029ef289483692f49889b0d4da7df44677 /drivers/net/ethernet/mellanox/mlx4/crdump.c | |
parent | 1a9914884db5138682032cf69f2d55739f236c80 (diff) | |
download | linux-3a5e523479c49b082b8ac291a1a9fbd035c06df5.tar.xz |
devlink: remove pointless data_len arg from region snapshot create
The size of the snapshot has to be the same as the size of the region,
therefore no need to pass it again during snapshot creation. Remove the
arg and use region->size instead.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/crdump.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/crdump.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/crdump.c b/drivers/net/ethernet/mellanox/mlx4/crdump.c index 88316c743820..eaf08f7ad128 100644 --- a/drivers/net/ethernet/mellanox/mlx4/crdump.c +++ b/drivers/net/ethernet/mellanox/mlx4/crdump.c @@ -99,8 +99,7 @@ static void mlx4_crdump_collect_crspace(struct mlx4_dev *dev, readl(cr_space + offset); err = devlink_region_snapshot_create(crdump->region_crspace, - cr_res_size, crspace_data, - id, &kvfree); + crspace_data, id, &kvfree); if (err) { kvfree(crspace_data); mlx4_warn(dev, "crdump: devlink create %s snapshot id %d err %d\n", @@ -139,9 +138,7 @@ static void mlx4_crdump_collect_fw_health(struct mlx4_dev *dev, readl(health_buf_start + offset); err = devlink_region_snapshot_create(crdump->region_fw_health, - HEALTH_BUFFER_SIZE, - health_data, - id, &kvfree); + health_data, id, &kvfree); if (err) { kvfree(health_data); mlx4_warn(dev, "crdump: devlink create %s snapshot id %d err %d\n", |