Skip to content

Commit 302f035

Browse files
ColinIanKingsnitm
authored andcommitted
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: Colin Ian King <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent c357342 commit 302f035

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/md/dm-cache-policy-smq.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,7 +1026,9 @@ static unsigned default_promote_level(struct smq_policy *mq)
10261026
* This scheme reminds me of a graph of entropy vs probability of a
10271027
* binary variable.
10281028
*/
1029-
static unsigned table[] = {1, 1, 1, 2, 4, 6, 7, 8, 7, 6, 4, 4, 3, 3, 2, 2, 1};
1029+
static const unsigned int table[] = {
1030+
1, 1, 1, 2, 4, 6, 7, 8, 7, 6, 4, 4, 3, 3, 2, 2, 1
1031+
};
10301032

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

0 commit comments

Comments
 (0)