linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Burton <paul.burton@imgtec.com>
To: <linux-mips@linux-mips.org>, Ralf Baechle <ralf@linux-mips.org>
Cc: "Steven J. Hill" <Steven.Hill@imgtec.com>,
	James Hogan <james.hogan@imgtec.com>,
	Paul Burton <paul.burton@imgtec.com>,
	<linux-kernel@vger.kernel.org>
Subject: [PATCH 2/5] MIPS: module-rela: Make consistent use of pr_*()
Date: Wed, 3 Feb 2016 03:44:42 +0000	[thread overview]
Message-ID: <1454471085-20963-3-git-send-email-paul.burton@imgtec.com> (raw)
In-Reply-To: <1454471085-20963-1-git-send-email-paul.burton@imgtec.com>

From: "Steven J. Hill" <Steven.Hill@imgtec.com>

The module relocation handling code has inconsistent use of printk() and
pr_*() functions. Convert printk() calls to use pr_err() and pr_warn().

Signed-off-by: Steven J. Hill <Steven.Hill@imgtec.com>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
---

 arch/mips/kernel/module-rela.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/arch/mips/kernel/module-rela.c b/arch/mips/kernel/module-rela.c
index 769e316..f1ff64b 100644
--- a/arch/mips/kernel/module-rela.c
+++ b/arch/mips/kernel/module-rela.c
@@ -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;
 		}
-- 
2.7.0

  parent reply	other threads:[~2016-02-03  3:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03  3:44 [PATCH 0/5] Support new MIPSr6 relocations Paul Burton
2016-02-03  3:44 ` [PATCH 1/5] MIPS: Bail on unsupported module relocs Paul Burton
2016-02-03 12:23   ` James Hogan
2016-02-03 12:24   ` Maciej W. Rozycki
2016-02-03 16:15     ` Paul Burton
2016-02-03 16:55       ` Maciej W. Rozycki
2016-02-03  3:44 ` Paul Burton [this message]
2016-02-03  3:44 ` [PATCH 3/5] MIPS: Add support for 64-bit R6 ELF relocations Paul Burton
2016-02-03  3:44 ` [PATCH 4/5] MIPS: Support R_MIPS_PC16 rel-style reloc Paul Burton
2016-02-03 10:25   ` Sergei Shtylyov
2016-02-03 10:32     ` Paul Burton
2016-02-03 10:36       ` Sergei Shtylyov
2016-02-03 10:48         ` Paul Burton
2016-02-03 12:49   ` James Hogan
2016-02-03  3:44 ` [PATCH 5/5] MIPS: Implement MIPSr6 R_MIPS_PC2x rel-style relocs Paul Burton
2016-02-03 12:47   ` James Hogan

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=1454471085-20963-3-git-send-email-paul.burton@imgtec.com \
    --to=paul.burton@imgtec.com \
    --cc=Steven.Hill@imgtec.com \
    --cc=james.hogan@imgtec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).