diff options
author | hselasky <hselasky@FreeBSD.org> | 2017-01-09 16:45:08 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2017-01-09 16:45:08 +0000 |
commit | 9ff9e425935ff703857c5383a7507e652a81607f (patch) | |
tree | 01142103561062c9833b98523e8c7c4c340b23f0 /sys | |
parent | 79bb75a34c3a447ed52acffff86fa5ef3d8722f0 (diff) | |
download | FreeBSD-src-9ff9e425935ff703857c5383a7507e652a81607f.zip FreeBSD-src-9ff9e425935ff703857c5383a7507e652a81607f.tar.gz |
MFC r310388:
Make a read only pointer constant.
Sponsored by: Mellanox Technologies
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index 23f664d..567025e 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -314,7 +314,7 @@ mlx5e_update_pport_counters(struct mlx5e_priv *priv) struct mlx5e_port_stats_debug *s_debug = &priv->stats.port_stats_debug; u32 *in; u32 *out; - u64 *ptr; + const u64 *ptr; unsigned sz = MLX5_ST_SZ_BYTES(ppcnt_reg); unsigned x; unsigned y; @@ -324,7 +324,7 @@ mlx5e_update_pport_counters(struct mlx5e_priv *priv) if (in == NULL || out == NULL) goto free_out; - ptr = (uint64_t *)MLX5_ADDR_OF(ppcnt_reg, out, counter_set); + ptr = (const uint64_t *)MLX5_ADDR_OF(ppcnt_reg, out, counter_set); MLX5_SET(ppcnt_reg, in, local_port, 1); |