Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751440AbbEZErt (ORCPT ); Tue, 26 May 2015 00:47:49 -0400 Received: from mail-oi0-f45.google.com ([209.85.218.45]:34664 "EHLO mail-oi0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751237AbbEZErp (ORCPT ); Tue, 26 May 2015 00:47:45 -0400 MIME-Version: 1.0 In-Reply-To: <5563DE28.4070100@huawei.com> References: <1431323549-27343-1-git-send-email-hofrat@osadl.org> <5563DE28.4070100@huawei.com> Date: Tue, 26 May 2015 12:46:44 +0800 Message-ID: Subject: Re: [PATCH] livepatch: match function return value type with prototype From: Minfei Huang To: Li Bin Cc: Jiri Kosina , Nicholas Mc Guire , Josh Poimboeuf , Seth Jennings , Vojtech Pavlik , "live-patching@vger.kernel.org" , "linux-kernel@vger.kernel.org" , xiexiuqi , Hanjun Guo , "mhuang@redhat.com" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1374 Lines: 44 On Tue, May 26, 2015 at 10:44 AM, Li Bin wrote: > The klp_is_module return type should be boolean. > > Signed-off-by: Li Bin > --- > kernel/livepatch/core.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/kernel/livepatch/core.c b/kernel/livepatch/core.c > index 284e269..30e9339 100644 > --- a/kernel/livepatch/core.c > +++ b/kernel/livepatch/core.c > @@ -78,7 +78,7 @@ static struct klp_ops *klp_find_ops(unsigned long old_addr) > > static bool klp_is_module(struct klp_object *obj) > { > - return obj->name; > + return !!obj->name; > } Hi, Bin. Does compile blame the prototype before you convert it? If not, I think we do not need to fix it, since there are a lot of places in kernel where we return point value as boolean. Thanks Minfei > > static bool klp_is_object_loaded(struct klp_object *obj) > -- > 1.7.1 > > > -- > To unsubscribe from this list: send the line "unsubscribe live-patching" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/