Commit 108744c4 authored by Ben Hutchings's avatar Ben Hutchings Committed by Ingo Molnar

tools/lib/lockdep: Define the ARRAY_SIZE() macro

lockdep.c now uses ARRAY_SIZE().
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: a.p.zijlstra@chello.nl
Fixes: 75dd602a ("lockdep: Fix lock_chain::base size")
Link: http://lkml.kernel.org/r/20170525130005.5947-4-alexander.levin@verizon.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 98dcea0c
......@@ -7,6 +7,8 @@
#include <linux/hardirq.h>
#include <linux/kern_levels.h>
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
#ifndef container_of
#define container_of(ptr, type, member) ({ \
const typeof(((type *)0)->member) * __mptr = (ptr); \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment