]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
MIPS: module: Make consistent use of pr_*()
authorSteven J. Hill <Steven.Hill@imgtec.com>
Thu, 4 Feb 2016 13:05:03 +0000 (13:05 +0000)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 13 May 2016 12:01:53 +0000 (14:01 +0200)
The module relocation handling code has inconsistent use of printk() and
pr_*() functions. Convert printk() calls to use pr_err() and pr_warn().

[paul.burton@imgtec.com: Do the same thing in module.c]

Signed-off-by: Steven J. Hill <sjhill@realitydiluted.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: Andrey Konovalov <adech.fo@gmail.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/12433/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/module-rela.c
arch/mips/kernel/module.c

index 9083d63b765cf9532f3a7e42f892a3b90b50811a..0570676b10e2ec3e30d4ca778741b7cbcf9f063b 100644 (file)
@@ -35,15 +35,13 @@ static int apply_r_mips_32_rela(struct module *me, u32 *location, Elf_Addr v)
 static int apply_r_mips_26_rela(struct module *me, u32 *location, Elf_Addr v)
 {
        if (v % 4) {
-               pr_err("module %s: dangerous R_MIPS_26 RELArelocation\n",
+               pr_err("module %s: dangerous R_MIPS_26 RELA relocation\n",
                       me->name);
                return -ENOEXEC;
        }
 
        if ((v & 0xf0000000) != (((unsigned long)location + 4) & 0xf0000000)) {
-               printk(KERN_ERR
-                      "module %s: relocation overflow\n",
-                      me->name);
+               pr_err("module %s: relocation overflow\n", me->name);
                return -ENOEXEC;
        }
 
@@ -130,7 +128,7 @@ int apply_relocate_add(Elf_Shdr *sechdrs, const char *strtab,
                        /* Ignore unresolved weak symbol */
                        if (ELF_ST_BIND(sym->st_info) == STB_WEAK)
                                continue;
-                       printk(KERN_WARNING "%s: Unknown symbol %s\n",
+                       pr_warn("%s: Unknown symbol %s\n",
                               me->name, strtab + sym->st_name);
                        return -ENOENT;
                }
index f9b2936d598def20f5f9be027a4b1e1a8af758c4..e16624f57fd5ad355913143ce51951bb7eb1a48c 100644 (file)
@@ -73,8 +73,7 @@ static int apply_r_mips_26_rel(struct module *me, u32 *location, Elf_Addr v)
        }
 
        if ((v & 0xf0000000) != (((unsigned long)location + 4) & 0xf0000000)) {
-               printk(KERN_ERR
-                      "module %s: relocation overflow\n",
+               pr_err("module %s: relocation overflow\n",
                       me->name);
                return -ENOEXEC;
        }
@@ -219,8 +218,8 @@ int apply_relocate(Elf_Shdr *sechdrs, const char *strtab,
                        /* Ignore unresolved weak symbol */
                        if (ELF_ST_BIND(sym->st_info) == STB_WEAK)
                                continue;
-                       printk(KERN_WARNING "%s: Unknown symbol %s\n",
-                              me->name, strtab + sym->st_name);
+                       pr_warn("%s: Unknown symbol %s\n",
+                               me->name, strtab + sym->st_name);
                        return -ENOENT;
                }