kbuild: remove pointless strdup() on arguments passed to new_module() in modpost
[linux-block.git] / scripts / mod / modpost.c
index 7e62303133dc68e16eb3b1457068cdf52b5db1d2..df6e6286a065c500ba9cc439be59b3f04a95d6d6 100644 (file)
@@ -1607,12 +1607,12 @@ static void read_symbols(char *modname)
 
        parse_elf_finish(&info);
 
-       /* Our trick to get versioning for struct_module - it's
+       /* Our trick to get versioning for module struct etc. - it's
         * never passed as an argument to an exported function, so
         * the automatic versioning doesn't pick it up, but it's really
         * important anyhow */
        if (modversions)
-               mod->unres = alloc_symbol("struct_module", 0, mod->unres);
+               mod->unres = alloc_symbol("module_layout", 0, mod->unres);
 }
 
 #define SZ 500
@@ -1913,7 +1913,7 @@ static void read_dump(const char *fname, unsigned int kernel)
                if (!mod) {
                        if (is_vmlinux(modname))
                                have_vmlinux = 1;
-                       mod = new_module(NOFAIL(strdup(modname)));
+                       mod = new_module(modname);
                        mod->skip = 1;
                }
                s = sym_add_exported(symname, mod, export_no(export));
@@ -1997,7 +1997,7 @@ static void read_markers(const char *fname)
 
                mod = find_module(modname);
                if (!mod) {
-                       mod = new_module(NOFAIL(strdup(modname)));
+                       mod = new_module(modname);
                        mod->skip = 1;
                }
                if (is_vmlinux(modname)) {