Commit 302f0351 authored by Colin Ian King's avatar Colin Ian King Committed by Mike Snitzer
Browse files

dm cache policy smq: make static read-only array table const



The 'table' static array is read-only so it make sense to make
it const. Add in the int type to clean up checkpatch warning.

Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent c3573421
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1026,7 +1026,9 @@ static unsigned default_promote_level(struct smq_policy *mq)
	 * This scheme reminds me of a graph of entropy vs probability of a
	 * binary variable.
	 */
	static unsigned table[] = {1, 1, 1, 2, 4, 6, 7, 8, 7, 6, 4, 4, 3, 3, 2, 2, 1};
	static const unsigned int table[] = {
		1, 1, 1, 2, 4, 6, 7, 8, 7, 6, 4, 4, 3, 3, 2, 2, 1
	};

	unsigned hits = mq->cache_stats.hits;
	unsigned misses = mq->cache_stats.misses;