xtensa: clean up custom-controlled debug output
Replace #ifdef'fed/commented out debug printk statements with pr_debug. Replace printk statements with pr_* equivalents. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
This commit is contained in:
@ -22,8 +22,6 @@
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/cache.h>
|
||||
|
||||
#undef DEBUG_RELOCATE
|
||||
|
||||
static int
|
||||
decode_calln_opcode (unsigned char *location)
|
||||
{
|
||||
@ -58,10 +56,9 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
|
||||
unsigned char *location;
|
||||
uint32_t value;
|
||||
|
||||
#ifdef DEBUG_RELOCATE
|
||||
printk("Applying relocate section %u to %u\n", relsec,
|
||||
sechdrs[relsec].sh_info);
|
||||
#endif
|
||||
pr_debug("Applying relocate section %u to %u\n", relsec,
|
||||
sechdrs[relsec].sh_info);
|
||||
|
||||
for (i = 0; i < sechdrs[relsec].sh_size / sizeof(*rela); i++) {
|
||||
location = (char *)sechdrs[sechdrs[relsec].sh_info].sh_addr
|
||||
+ rela[i].r_offset;
|
||||
@ -87,7 +84,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
|
||||
value -= ((unsigned long)location & -4) + 4;
|
||||
if ((value & 3) != 0 ||
|
||||
((value + (1 << 19)) >> 20) != 0) {
|
||||
printk("%s: relocation out of range, "
|
||||
pr_err("%s: relocation out of range, "
|
||||
"section %d reloc %d "
|
||||
"sym '%s'\n",
|
||||
mod->name, relsec, i,
|
||||
@ -111,7 +108,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
|
||||
value -= (((unsigned long)location + 3) & -4);
|
||||
if ((value & 3) != 0 ||
|
||||
(signed int)value >> 18 != -1) {
|
||||
printk("%s: relocation out of range, "
|
||||
pr_err("%s: relocation out of range, "
|
||||
"section %d reloc %d "
|
||||
"sym '%s'\n",
|
||||
mod->name, relsec, i,
|
||||
@ -156,7 +153,7 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
|
||||
case R_XTENSA_SLOT12_OP:
|
||||
case R_XTENSA_SLOT13_OP:
|
||||
case R_XTENSA_SLOT14_OP:
|
||||
printk("%s: unexpected FLIX relocation: %u\n",
|
||||
pr_err("%s: unexpected FLIX relocation: %u\n",
|
||||
mod->name,
|
||||
ELF32_R_TYPE(rela[i].r_info));
|
||||
return -ENOEXEC;
|
||||
@ -176,13 +173,13 @@ int apply_relocate_add(Elf32_Shdr *sechdrs,
|
||||
case R_XTENSA_SLOT12_ALT:
|
||||
case R_XTENSA_SLOT13_ALT:
|
||||
case R_XTENSA_SLOT14_ALT:
|
||||
printk("%s: unexpected ALT relocation: %u\n",
|
||||
pr_err("%s: unexpected ALT relocation: %u\n",
|
||||
mod->name,
|
||||
ELF32_R_TYPE(rela[i].r_info));
|
||||
return -ENOEXEC;
|
||||
|
||||
default:
|
||||
printk("%s: unexpected relocation: %u\n",
|
||||
pr_err("%s: unexpected relocation: %u\n",
|
||||
mod->name,
|
||||
ELF32_R_TYPE(rela[i].r_info));
|
||||
return -ENOEXEC;
|
||||
|
Reference in New Issue
Block a user