linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zou Wei <zou_wei@huawei.com>
To: <akpm@linux-foundation.org>, <linux-mm@kvack.org>,
	<linux-kernel@vger.kernel.org>
Cc: Zou Wei <zou_wei@huawei.com>
Subject: [PATCH -next] mm/usercopy: fix warning Comparison to bool
Date: Tue, 14 Apr 2020 11:42:04 +0800	[thread overview]
Message-ID: <1586835724-45738-1-git-send-email-zou_wei@huawei.com> (raw)

fix below warnings reported by coccicheck

mm/usercopy.c:304:5-18: WARNING: Comparison to bool

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
---
 mm/usercopy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/usercopy.c b/mm/usercopy.c
index 660717a..04346cf 100644
--- 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;
 }
-- 
2.6.2


             reply	other threads:[~2020-04-14  3:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-14  3:42 Zou Wei [this message]
2020-04-15 23:04 ` [PATCH -next] mm/usercopy: fix warning Comparison to bool Andrew Morton
2020-04-16 10:45   ` 答复: " Zouwei (Samuel)
2020-04-16 11:23     ` David Hildenbrand

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=1586835724-45738-1-git-send-email-zou_wei@huawei.com \
    --to=zou_wei@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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;
as well as URLs for NNTP newsgroup(s).