summaryrefslogtreecommitdiffstats
path: root/lib/stackdepot.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/stackdepot.c')
-rw-r--r--lib/stackdepot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/stackdepot.c b/lib/stackdepot.c
index 683b6a8ddade..890dcc2e984e 100644
--- a/lib/stackdepot.c
+++ b/lib/stackdepot.c
@@ -154,8 +154,8 @@ static struct stack_record *stack_table[STACK_HASH_SIZE] = {
static inline u32 hash_stack(unsigned long *entries, unsigned int size)
{
return jhash2((u32 *)entries,
- size * sizeof(unsigned long) / sizeof(u32),
- STACK_HASH_SEED);
+ array_size(size, sizeof(*entries)) / sizeof(u32),
+ STACK_HASH_SEED);
}
/* Use our own, non-instrumented version of memcmp().