lkml.org 
[lkml]   [2020]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -next] mm/usercopy: fix warning Comparison to bool
On Tue, 14 Apr 2020 11:42:04 +0800 Zou Wei <zou_wei@huawei.com> wrote:

> fix below warnings reported by coccicheck
>
> mm/usercopy.c:304:5-18: WARNING: Comparison to bool
>
> ...
>
> --- a/mm/usercopy.c
> +++ b/mm/usercopy.c
> @@ -301,7 +301,7 @@ __setup("hardened_usercopy=", parse_hardened_usercopy);
>
> static int __init set_hardened_usercopy(void)
> {
> - if (enable_checks == false)
> + if (!enable_checks)
> static_branch_enable(&bypass_usercopy_checks);
> return 1;
> }

My initial reaction is "fix coccicheck". There's nothing wrong with
that code?

\
 
 \ /
  Last update: 2020-04-16 01:07    [W:0.064 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site