lkml.org 
[lkml]   [2015]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] livepatch: match function return value type with prototype
From
On Tue, May 26, 2015 at 10:44 AM, Li Bin <huawei.libin@huawei.com> wrote:
> The klp_is_module return type should be boolean.
>
> Signed-off-by: Li Bin <huawei.libin@huawei.com>
> ---
> 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


\
 
 \ /
  Last update: 2015-05-26 07:21    [W:0.071 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site