All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
To: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>,
	linuxppc-dev@lists.ozlabs.org,
	Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>,
	Masami Hiramatsu <mhiramat@kernel.org>
Subject: Re: [PATCH 1/5] powerpc/kprobes: Some cosmetic updates to try_to_emulate()
Date: Thu, 14 Sep 2017 11:46:06 +0530	[thread overview]
Message-ID: <bbad9ff2-6849-6ae6-691a-50d75ef3dd35@linux.vnet.ibm.com> (raw)
In-Reply-To: <2bc413d679c563d3ee338c318066777318577ab2.1505336870.git.naveen.n.rao@linux.vnet.ibm.com>

On Thursday 14 September 2017 02:50 AM, Naveen N. Rao wrote:
> 1. This is only used in kprobes.c, so make it static.
> 2. Remove the un-necessary (ret == 0) comparison in the else clause.
>
> Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>

Reviewed-by: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>

> ---
>  arch/powerpc/kernel/kprobes.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/kernel/kprobes.c b/arch/powerpc/kernel/kprobes.c
> index 367494dc67d9..c2a6ab38a67f 100644
> --- 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;
>

      parent reply	other threads:[~2017-09-14  6:16 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-13 21:20 [PATCH 1/5] powerpc/kprobes: Some cosmetic updates to try_to_emulate() Naveen N. Rao
2017-09-13 21:20 ` [PATCH 2/5] powerpc/kprobes: Do not suppress instruction emulation if a single run failed Naveen N. Rao
2017-09-13 23:53   ` Masami Hiramatsu
2017-09-14  6:38     ` Naveen N. Rao
2017-09-14  9:45       ` Masami Hiramatsu
2017-09-14 10:03         ` Naveen N. Rao
2017-09-13 21:20 ` [PATCH 3/5] powerpc/kprobes: Fix warnings from __this_cpu_read() on preempt kernels Naveen N. Rao
2017-09-14  0:36   ` Masami Hiramatsu
2017-09-14  6:47     ` Naveen N. Rao
2017-09-14 10:10       ` Masami Hiramatsu
2017-09-16 11:25         ` Naveen N. Rao
2017-09-14  9:48   ` Kamalesh Babulal
2017-09-13 21:20 ` [PATCH 4/5] powerpc/jprobes: Disable preemption when triggered through ftrace Naveen N. Rao
2017-09-14  0:05   ` Masami Hiramatsu
2017-09-14 10:25     ` Naveen N. Rao
2017-09-14 10:53       ` Masami Hiramatsu
2017-09-13 21:20 ` [PATCH 5/5] powerpc/jprobes: Validate break handler invocation as being due to a jprobe_return() Naveen N. Rao
2017-09-14  0:38   ` Masami Hiramatsu
2017-09-13 23:18 ` [PATCH 1/5] powerpc/kprobes: Some cosmetic updates to try_to_emulate() Masami Hiramatsu
2017-09-14  6:16 ` Kamalesh Babulal [this message]

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=bbad9ff2-6849-6ae6-691a-50d75ef3dd35@linux.vnet.ibm.com \
    --to=kamalesh@linux.vnet.ibm.com \
    --cc=ananth@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mhiramat@kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.