Commit a6dac400 authored by Masahiro Yamada's avatar Masahiro Yamada

kconfig: move ARRAY_SIZE to a header

To use ARRAY_SIZE from other files, move it to its own header,
just like include/linux/array_size.h.
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent 0a3128e7
/* 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 */
......@@ -9,13 +9,12 @@
#include <stdlib.h>
#include <string.h>
#include "array_size.h"
#include "internal.h"
#include "list.h"
#include "lkc.h"
#include "preprocess.h"
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
static char *expand_string_with_args(const char *in, int argc, char *argv[]);
static char *expand_string(const char *in);
......
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