diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2017-05-25 12:58:34 +0000 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-06-05 09:28:04 +0200 |
commit | 108744c45fd8a51e763e976d9e5b2cc265d4a847 (patch) | |
tree | e19dbc910e9e7dc7d9d69102d02fafc58a28a78c /tools/lib/lockdep | |
parent | 98dcea0cfd04e083ac74137ceb9a632604740e2d (diff) | |
download | linux-rpi-108744c45fd8a51e763e976d9e5b2cc265d4a847.tar.gz linux-rpi-108744c45fd8a51e763e976d9e5b2cc265d4a847.tar.bz2 linux-rpi-108744c45fd8a51e763e976d9e5b2cc265d4a847.zip |
tools/lib/lockdep: Define the ARRAY_SIZE() macro
lockdep.c now uses ARRAY_SIZE().
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Sasha 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: 75dd602a5198 ("lockdep: Fix lock_chain::base size")
Link: http://lkml.kernel.org/r/20170525130005.5947-4-alexander.levin@verizon.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/lib/lockdep')
-rw-r--r-- | tools/lib/lockdep/uinclude/linux/kernel.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/lib/lockdep/uinclude/linux/kernel.h b/tools/lib/lockdep/uinclude/linux/kernel.h index 276c7a8b2ed1..da87bd9ad2c1 100644 --- a/tools/lib/lockdep/uinclude/linux/kernel.h +++ b/tools/lib/lockdep/uinclude/linux/kernel.h @@ -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); \ |