Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp755751ybz; Wed, 15 Apr 2020 18:15:33 -0700 (PDT) X-Google-Smtp-Source: APiQypI+pr1LR/4VAZ8iZRNaXIaQ2qNQEjDmdyIjyZjpm0wrn3cvUo+bG6vWC6IGCxJcnDaypITC X-Received: by 2002:a17:906:808:: with SMTP id e8mr7411566ejd.372.1586999733415; Wed, 15 Apr 2020 18:15:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586999733; cv=none; d=google.com; s=arc-20160816; b=EclyifayQvNyXxfCIIjWMAf+GDPuXR1+xok/qvURJAUV0k05tujAa10l2Om9Qn9dGb gUudNc5riyR1q8d/btNoS6mxV9QxlNnN7Pw2wOzy1ya9nVqEXicq1b6UAkPah8gwPW20 /Ksnc127tB1Y4SIl+Fjx3O4EHTejjvUq4bgittEMfocEKUKlqTKiVL6DK86leqeaipy3 cKdDLb436LzdxIioHFhKaDKBdXG6hxsw+m7CuVTRreu5ZxMlBPUNVOv5qPo2Xxm7cn4Y SZRz6gKraDarDo1KipsoVCKBKI77Q+fQQilR+zWp8Jwurenx4PJpA10+935GSZvAHNzI Nhzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=kvtOHCZlQupGwpeacPrHUqo5Zg2Dpd+t5glq1HynICI=; b=gP3QeRuUYpu4t8XRad+ccvaHlVnqC/+PGGGHaOrbuky/d2pl/iFlVuWbRVA3cgHa8H DEvgTKRZR7MNTvkvoOA8mzTP88QosbJdNvR6xwwEKq5NodM4TIuk6HNkMk9gxgpzblGw VN0qGNPpy54tl1URjdNOUF3Z8sTMlkm6CEc2k0aaRL/8Ye5MKgR3hEB63gKG2fWTIKCp G0HNBGyo7/YwN8ufwSTP541haTpg9ZVdIpwuFyksFXpYGn+LtHba2dM9oOKD/m99WBhy YFSbiBJ4s56zRp1d7GZw6h6wCGe+yQ8UlIsGoIQQaq3OHsEg9U9nxUcUJZ3z42r9N49F rzPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zL+Lb3Se; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rs7si631271ejb.533.2020.04.15.18.15.10; Wed, 15 Apr 2020 18:15:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zL+Lb3Se; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387987AbgDOXEv (ORCPT + 99 others); Wed, 15 Apr 2020 19:04:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:44406 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387937AbgDOXEm (ORCPT ); Wed, 15 Apr 2020 19:04:42 -0400 Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3FC6F20768; Wed, 15 Apr 2020 23:04:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586991880; bh=55qAwhO0WzZi7LtNMraWynM8BWS2Jzp4KBDWiaLriyU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=zL+Lb3SetfXpJ1/3b5i2NIrMtw3EomzLT2OldikQWOTfL9K+64V4uQEvlC6G0GNRi ya1Iu/dc5hdW0Z5y0tTCBJyw2xUHQf8ov+8RobpU+ii90Q177oZSGZZfjonjfTVZA/ iw+EvQqes52ioJy350hn9Yx4b4cQNcnfuXN0tqIg= Date: Wed, 15 Apr 2020 16:04:39 -0700 From: Andrew Morton To: Zou Wei Cc: , Subject: Re: [PATCH -next] mm/usercopy: fix warning Comparison to bool Message-Id: <20200415160439.256c89d4cb67b76d4119935d@linux-foundation.org> In-Reply-To: <1586835724-45738-1-git-send-email-zou_wei@huawei.com> References: <1586835724-45738-1-git-send-email-zou_wei@huawei.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Apr 2020 11:42:04 +0800 Zou Wei 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?