Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Dec 2016 10:12:19 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r310388 - head/sys/dev/mlx5/mlx5_en
Message-ID:  <201612221012.uBMACJQB075662@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201612221012.uBMACJQB075662>