aboutsummaryrefslogtreecommitdiffstats
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
parentmodpost: remove the unused argument of check_sec_ref() (diff)
downloadlinux-dev-c5c468dcc25efc0095361bb63b6255622e22f695.tar.xz
linux-dev-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 '')
-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)
{