projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3dda4b
)
powerpc/kprobes: Some cosmetic updates to try_to_emulate()
author
Naveen N. Rao
<
[email protected]
>
Fri, 22 Sep 2017 09:10:43 +0000
(14:40 +0530)
committer
Michael Ellerman
<
[email protected]
>
Wed, 4 Oct 2017 12:42:12 +0000
(23:42 +1100)
1. This is only used in kprobes.c, so make it static.
2. Remove the un-necessary (ret == 0) comparison in the else clause.
Reviewed-by: Masami Hiramatsu <
[email protected]
>
Reviewed-by: Kamalesh Babulal <
[email protected]
>
Signed-off-by: Naveen N. Rao <
[email protected]
>
Signed-off-by: Michael Ellerman <
[email protected]
>
arch/powerpc/kernel/kprobes.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/kernel/kprobes.c
b/arch/powerpc/kernel/kprobes.c
index 367494dc67d9e89a34ae7273b737479349987aef..c2a6ab38a67f092f09ef2d1e52f6729beff207b8 100644
(file)
--- a/
arch/powerpc/kernel/kprobes.c
+++ b/
arch/powerpc/kernel/kprobes.c
@@
-239,7
+239,7
@@
void arch_prepare_kretprobe(struct kretprobe_instance *ri, struct pt_regs *regs)
}
NOKPROBE_SYMBOL(arch_prepare_kretprobe);
-int try_to_emulate(struct kprobe *p, struct pt_regs *regs)
+
static
int try_to_emulate(struct kprobe *p, struct pt_regs *regs)
{
int ret;
unsigned int insn = *p->ainsn.insn;
@@
-261,7
+261,7
@@
int try_to_emulate(struct kprobe *p, struct pt_regs *regs)
*/
printk("Can't step on instruction %x\n", insn);
BUG();
- } else
if (ret == 0)
+ } else
/* This instruction can't be boosted */
p->ainsn.boostable = -1;