[PATCH 01/25] kernel/module.c: fix compile err, warnings under ifdef DEBUGP

From: jim . cromie
Date: Tue Dec 06 2011 - 14:12:10 EST


From: Jim Cromie <jim.cromie@xxxxxxxxx>

resubmit of https://lkml.org/lkml/2010/9/15/399 4/4 patch
with tiny mod.

Fixes these warnings, err if DEBUGP is defined in kernel/module.c:

kernel/module.c: In function âlayout_sectionsâ:
kernel/module.c:1776: error: ânameâ undeclared (first use in this function)
kernel/module.c:1776: error: (Each undeclared identifier is reported only once
kernel/module.c:1776: error: for each function it appears in.)
kernel/module.c: In function âmove_moduleâ:
kernel/module.c:2394: warning: format â%lxâ expects type âlong unsigned intâ,
but argument 2 has type âElf64_Addrâ

Signed-off-by: Jim Cromie <jim.cromie@xxxxxxxxx>
---
kernel/module.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/module.c b/kernel/module.c
index 178333c..30ffed4 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -1978,7 +1978,7 @@ static void layout_sections(struct module *mod, struct load_info *info)
|| strstarts(sname, ".init"))
continue;
s->sh_entsize = get_offset(mod, &mod->core_size, s, i);
- DEBUGP("\t%s\n", name);
+ DEBUGP("\t%s\n", sname);
}
switch (m) {
case 0: /* executable */
@@ -2639,8 +2639,8 @@ static int move_module(struct module *mod, struct load_info *info)
memcpy(dest, (void *)shdr->sh_addr, shdr->sh_size);
/* Update sh_addr to point to copy in image. */
shdr->sh_addr = (unsigned long)dest;
- DEBUGP("\t0x%lx %s\n",
- shdr->sh_addr, info->secstrings + shdr->sh_name);
+ DEBUGP("\t0x%p %s\n",
+ (void *)shdr->sh_addr, info->secstrings + shdr->sh_name);
}

return 0;
--
1.7.7.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/