Skip to content

Commit

Permalink
powerpc: Remove dead module_find_bug code
Browse files Browse the repository at this point in the history
Doing some various "make randconfig", I came across an error when
CONFIG_BUG was not set:

arch/powerpc/kernel/module.c: In function 'module_find_bug':
arch/powerpc/kernel/module.c:111: error: increment of pointer to unknown structure
arch/powerpc/kernel/module.c:111: error: arithmetic on pointer to an incomplete type
arch/powerpc/kernel/module.c:112: error: dereferencing pointer to incomplete type

Looking further into this, I found that module_find_bug, defined in
powerpc arch code, is not called anywhere, so this just removes it.

There is a static module_find_bug in lib/bug.c but that is a separate issue.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Steven Rostedt authored and Paul Mackerras committed Aug 18, 2008
1 parent ac22429 commit b975456
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions arch/powerpc/kernel/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,3 @@ void module_arch_cleanup(struct module *mod)
{
module_bug_cleanup(mod);
}

struct bug_entry *module_find_bug(unsigned long bugaddr)
{
struct mod_arch_specific *mod;
unsigned int i;
struct bug_entry *bug;

list_for_each_entry(mod, &module_bug_list, bug_list) {
bug = mod->bug_table;
for (i = 0; i < mod->num_bugs; ++i, ++bug)
if (bugaddr == bug->bug_addr)
return bug;
}
return NULL;
}

0 comments on commit b975456

Please sign in to comment.