summaryrefslogtreecommitdiffstats
path: root/scripts/mod/file2alias.c
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2022-05-24 01:46:25 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2022-05-27 16:15:40 +0900
commitc5c468dcc25efc0095361bb63b6255622e22f695 (patch)
treeefdd5e9901d8fe8901d4c293fc4a61d0fc02bae1 /scripts/mod/file2alias.c
parent76954527fe05354add150737aa1b9a6baa4a6ee5 (diff)
downloadlinux-c5c468dcc25efc0095361bb63b6255622e22f695.tar.gz
linux-c5c468dcc25efc0095361bb63b6255622e22f695.tar.bz2
linux-c5c468dcc25efc0095361bb63b6255622e22f695.zip
modpost: reuse ARRAY_SIZE() macro for section_mismatch()
Move ARRAY_SIZE() from file2alias.c to modpost.h to reuse it in section_mismatch(). Also, move the variable 'check' inside the for-loop. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Diffstat (limited to 'scripts/mod/file2alias.c')
-rw-r--r--scripts/mod/file2alias.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 5258247d78ac..e8a9c6816fec 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -734,8 +734,6 @@ static int do_vio_entry(const char *filename, void *symval,
return 1;
}
-#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
-
static void do_input(char *alias,
kernel_ulong_t *arr, unsigned int min, unsigned int max)
{