diff mbox series

[3/4] modpost: remove redundant is_vmlinux() test

Message ID 1525859440-29583-3-git-send-email-yamada.masahiro@socionext.com
State Accepted
Commit 074a04f572effefe410d7ee452cf3755e828c031
Headers show
Series [1/4] modpost: pass struct elf_info pointer to get_modinfo() | expand

Commit Message

Masahiro Yamada May 9, 2018, 9:50 a.m. UTC
The second test of is_vmlinux() is redundant.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

---

 scripts/mod/modpost.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
2.7.4
diff mbox series

Patch

diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 8606b6c..9e70a6a 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -1971,8 +1971,7 @@  static void read_symbols(char *modname)
 		handle_modversions(mod, &info, sym, symname);
 		handle_moddevtable(mod, &info, sym, symname);
 	}
-	if (!is_vmlinux(modname) ||
-	     (is_vmlinux(modname) && vmlinux_section_warnings))
+	if (!is_vmlinux(modname) || vmlinux_section_warnings)
 		check_sec_ref(mod, modname, &info);
 
 	version = get_modinfo(&info, "version");