Merge branch 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied...
[linux-drm-fsl-dcu.git] / arch / avr32 / kernel / module.c
index dfc32f2817b6f6e11ad1b1de45eec7d8969ab592..1167fe9cf6c4884c3448c01c1fbf037ce282af65 100644 (file)
  * published by the Free Software Foundation.
  */
 
-#include <linux/moduleloader.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
+#include <linux/bug.h>
 #include <linux/elf.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/moduleloader.h>
 #include <linux/vmalloc.h>
 
 void *module_alloc(unsigned long size)
@@ -263,7 +264,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
                         * value of PC.  Just subtract the value of
                         * GOT, and we're done.
                         */
-                       pr_debug("GOTPC: PC=0x%lx, got_offset=0x%lx, core=0x%p\n",
+                       pr_debug("GOTPC: PC=0x%x, got_offset=0x%lx, core=0x%p\n",
                                 relocation, module->arch.got_offset,
                                 module->module_core);
                        relocation -= ((unsigned long)module->module_core
@@ -282,7 +283,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs, const char *strtab,
                            && (relocation & 0xffff0000) != 0xffff0000)
                                return reloc_overflow(module, "R_AVR32_GOT16S",
                                                      relocation);
-                       pr_debug("GOT reloc @ 0x%lx -> %lu\n",
+                       pr_debug("GOT reloc @ 0x%x -> %u\n",
                                 rel->r_offset, relocation);
                        value = *location;
                        value = ((value & 0xffff0000)
@@ -315,10 +316,10 @@ int module_finalize(const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs,
        vfree(module->arch.syminfo);
        module->arch.syminfo = NULL;
 
-       return 0;
+       return module_bug_finalize(hdr, sechdrs, module);
 }
 
 void module_arch_cleanup(struct module *module)
 {
-
+       module_bug_cleanup(module);
 }