arm64: use __func__ to get function name in pr_err

Prefer using '"%s...", __func__' to get current function's name in
a debug message.

Signed-off-by: Jason Wang <wangborong@cdjrlc.com>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20210726122907.51529-1-wangborong@cdjrlc.com
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
This commit is contained in:
Jason Wang 2021-07-26 20:29:07 +08:00 committed by Catalin Marinas
parent ec63e300fa
commit 2806556c5e

View File

@ -185,7 +185,7 @@ u64 aarch64_insn_decode_immediate(enum aarch64_insn_imm_type type, u32 insn)
break; break;
default: default:
if (aarch64_get_imm_shift_mask(type, &mask, &shift) < 0) { if (aarch64_get_imm_shift_mask(type, &mask, &shift) < 0) {
pr_err("aarch64_insn_decode_immediate: unknown immediate encoding %d\n", pr_err("%s: unknown immediate encoding %d\n", __func__,
type); type);
return 0; return 0;
} }
@ -215,7 +215,7 @@ u32 __kprobes aarch64_insn_encode_immediate(enum aarch64_insn_imm_type type,
break; break;
default: default:
if (aarch64_get_imm_shift_mask(type, &mask, &shift) < 0) { if (aarch64_get_imm_shift_mask(type, &mask, &shift) < 0) {
pr_err("aarch64_insn_encode_immediate: unknown immediate encoding %d\n", pr_err("%s: unknown immediate encoding %d\n", __func__,
type); type);
return AARCH64_BREAK_FAULT; return AARCH64_BREAK_FAULT;
} }