From: Randy Dunlap <randy.dunlap@oracle.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: lkml <linux-kernel@vger.kernel.org>, akpm <akpm@linux-foundation.org>
Subject: [PATCH v2] module: fix build when DEBUGP is defined
Date: Wed, 12 Jan 2011 16:12:17 -0800 [thread overview]
Message-ID: <20110112161217.0da1d290.randy.dunlap@oracle.com> (raw)
In-Reply-To: <201101130832.16210.rusty@rustcorp.com.au>
From: Randy Dunlap <randy.dunlap@oracle.com>
Fix module loader build when DEBUGP is defined.
Fixes build error & warning:
(on x86_64:)
kernel/module.c:1910: error: 'name' undeclared (first use in this function)
kernel/module.c:2567: warning: format '%lx' expects type 'long unsigned int', but argument 2 has type 'Elf64_Addr'
(or on i386:)
kernel/module.c:2567: warning: format '%lx' expects type 'long unsigned int', but argument 2 has type 'Elf32_Addr'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
---
kernel/module.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- linux-next-20110111.orig/kernel/module.c
+++ linux-next-20110111/kernel/module.c
@@ -1907,7 +1907,7 @@ static void layout_sections(struct modul
|| 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 */
@@ -2564,7 +2564,8 @@ static int move_module(struct module *mo
/* 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);
+ (unsigned long)shdr->sh_addr,
+ info->secstrings + shdr->sh_name);
}
return 0;
prev parent reply other threads:[~2011-01-13 0:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-12 1:21 [PATCH] module: fix build when DEBUGP is defined Randy Dunlap
2011-01-12 8:48 ` Rusty Russell
2011-01-12 16:26 ` Randy Dunlap
2011-01-12 22:02 ` Rusty Russell
2011-01-13 0:12 ` Randy Dunlap [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110112161217.0da1d290.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.