summaryrefslogtreecommitdiff
path: root/scripts/include/array_size.h
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2024-08-14 16:56:42 -0400
committerSteven Rostedt (Google) <rostedt@goodmis.org>2024-08-14 16:59:28 -0400
commitee057c8c194b9283f4137b253b70e292693a39f0 (patch)
tree4ee9868bfc432e0b1230016cd316468719f0b477 /scripts/include/array_size.h
parentb96c312551b241bc17226c5347c6d6b38a1efd3e (diff)
parent7c626ce4bae1ac14f60076d00eafe71af30450ba (diff)
Merge tag 'v6.11-rc3' into trace/ring-buffer/core
The "reserve_mem" kernel command line parameter has been pulled into v6.11. Merge the latest -rc3 to allow the persistent ring buffer memory to be able to be mapped at the address specified by the "reserve_mem" command line parameter. Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Diffstat (limited to 'scripts/include/array_size.h')
-rw-r--r--scripts/include/array_size.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/include/array_size.h b/scripts/include/array_size.h
new file mode 100644
index 000000000000..26ba78d867d1
--- /dev/null
+++ b/scripts/include/array_size.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef ARRAY_SIZE_H
+#define ARRAY_SIZE_H
+
+/**
+ * ARRAY_SIZE - get the number of elements in array @arr
+ * @arr: array to be sized
+ */
+#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
+
+#endif /* ARRAY_SIZE_H */