From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756877AbdLPOua (ORCPT ); Sat, 16 Dec 2017 09:50:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:58782 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752834AbdLPOu3 (ORCPT ); Sat, 16 Dec 2017 09:50:29 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 41DD5218C5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=mhiramat@kernel.org Date: Sat, 16 Dec 2017 23:50:25 +0900 From: Masami Hiramatsu To: guzhifeng Cc: ananth@linux.vnet.ibm.com, anil.s.keshavamurthy@intel.com, davem@davemloft.net, linux-kernel@vger.kernel.org, Ingo Molnar Subject: Re: [PATCH] kernel/kprobes: kprobes_built_in can be boolean Message-Id: <20171216235025.4e0e637ad4689728d8bf1901@kernel.org> In-Reply-To: <1513320072-2886-1-git-send-email-guzhifeng@cmss.chinamobile.com> References: <1513320072-2886-1-git-send-email-guzhifeng@cmss.chinamobile.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 15 Dec 2017 14:41:12 +0800 guzhifeng 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 Thank you, > > Signed-off-by: guzhifeng > --- > 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