svn commit: r310388 - head/sys/dev/mlx5/mlx5_en
Hans Petter Selasky
hselasky at FreeBSD.org
Thu Dec 22 10:12:21 UTC 2016
Author: hselasky
Date: Thu Dec 22 10:12:19 2016
New Revision: 310388
URL: https://svnweb.freebsd.org/changeset/base/310388
Log:
Make a read only pointer constant.
Sponsored by: Mellanox Technologies
MFC after: 1 week
Modified:
head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
Modified: head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
==============================================================================
--- head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu Dec 22 10:11:03 2016 (r310387)
+++ head/sys/dev/mlx5/mlx5_en/mlx5_en_main.c Thu Dec 22 10:12:19 2016 (r310388)
@@ -320,7 +320,7 @@ mlx5e_update_pport_counters(struct mlx5e
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;
@@ -335,7 +335,7 @@ mlx5e_update_pport_counters(struct mlx5e
* Get pointer to the 64-bit counter set which is located at a
* fixed offset in the output firmware request structure:
*/
- 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);
More information about the svn-src-all
mailing list