projects
/
linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b30ad9d
)
liblockdep: Define the ARRAY_SIZE() macro
author
Ben Hutchings
<ben@decadent.org.uk>
Tue, 14 Jun 2016 20:14:14 +0000
(21:14 +0100)
committer
Ben Hutchings
<ben@decadent.org.uk>
Thu, 28 Sep 2017 17:27:56 +0000
(18:27 +0100)
lockdep.c now uses ARRAY_SIZE().
Fixes: 75dd602a5198 ("lockdep: Fix lock_chain::base size")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name liblockdep-define-the-array_size-macro.patch
tools/lib/lockdep/uinclude/linux/kernel.h
patch
|
blob
|
history
diff --git
a/tools/lib/lockdep/uinclude/linux/kernel.h
b/tools/lib/lockdep/uinclude/linux/kernel.h
index 276c7a8b2ed127ccdad6d4be0f31580bde9a84ff..da87bd9ad2c1848100987ba415cfae90792eb4b3 100644
(file)
--- 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); \