mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: guzhifeng <guzhifeng@cmss.chinamobile.com>
Cc: ananth@linux.vnet.ibm.com, anil.s.keshavamurthy@intel.com,
	davem@davemloft.net, linux-kernel@vger.kernel.org,
	Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH] kernel/kprobes: kprobes_built_in can be boolean
Date: Sat, 16 Dec 2017 23:50:25 +0900	[thread overview]
Message-ID: <20171216235025.4e0e637ad4689728d8bf1901@kernel.org> (raw)
In-Reply-To: <1513320072-2886-1-git-send-email-guzhifeng@cmss.chinamobile.com>

On Fri, 15 Dec 2017 14:41:12 +0800
guzhifeng <guzhifeng@cmss.chinamobile.com> wrote:

> This patch makes kprobes_built_in return bool due to this
> particular function only using either one or zero as its return
> value.
> 
> No functional change.

This seems OK to me.

Acked-by: Masami Hiramatsu <mhiramat@kernel.org>

Thank you,

> 
> Signed-off-by: guzhifeng <guzhifeng@cmss.chinamobile.com>
> ---
>  include/linux/kprobes.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h
> index 9440a2f..8d0d910 100644
> --- a/include/linux/kprobes.h
> +++ b/include/linux/kprobes.h
> @@ -219,9 +219,9 @@ struct kprobe_blacklist_entry {
>  /*
>   * For #ifdef avoidance:
>   */
> -static inline int kprobes_built_in(void)
> +static inline bool kprobes_built_in(void)
>  {
> -	return 1;
> +	return true;
>  }
>  
>  #ifdef CONFIG_KRETPROBES
> @@ -409,9 +409,9 @@ static inline struct kprobe_ctlblk *get_kprobe_ctlblk(void)
>  
>  #else /* !CONFIG_KPROBES: */
>  
> -static inline int kprobes_built_in(void)
> +static inline bool kprobes_built_in(void)
>  {
> -	return 0;
> +	return false;
>  }
>  static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr)
>  {
> -- 
> 1.8.3.1
> 
> 
> 


-- 
Masami Hiramatsu <mhiramat@kernel.org>

      reply	other threads:[~2017-12-16 14:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-15  6:41 guzhifeng
2017-12-16 14:50 ` Masami Hiramatsu [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=20171216235025.4e0e637ad4689728d8bf1901@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=ananth@linux.vnet.ibm.com \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=davem@davemloft.net \
    --cc=guzhifeng@cmss.chinamobile.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.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

Powered by JetHome