modpost: reuse ARRAY_SIZE() macro for section_mismatch()
authorMasahiro Yamada <masahiroy@kernel.org>
Mon, 23 May 2022 16:46:25 +0000 (01:46 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Fri, 27 May 2022 07:15:40 +0000 (16:15 +0900)
commitc5c468dcc25efc0095361bb63b6255622e22f695
treeefdd5e9901d8fe8901d4c293fc4a61d0fc02bae1
parent76954527fe05354add150737aa1b9a6baa4a6ee5
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>
scripts/mod/file2alias.c
scripts/mod/modpost.c
scripts/mod/modpost.h