From: Ben Hutchings Date: Thu, 25 May 2017 12:58:34 +0000 (+0000) Subject: tools/lib/lockdep: Define the ARRAY_SIZE() macro X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=108744c45fd8a51e763e976d9e5b2cc265d4a847;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git tools/lib/lockdep: Define the ARRAY_SIZE() macro lockdep.c now uses ARRAY_SIZE(). Signed-off-by: Ben Hutchings Signed-off-by: Sasha Levin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner 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 --- 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 #include +#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); \