Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4668792imu; Sat, 1 Dec 2018 00:06:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/X/neg/8FhnpXRTlCRK6MhYtHG2+FvI5RCOD55RmLavNKSKBm7PxDcyxkLXaiYr39gPgnN+ X-Received: by 2002:a63:b34f:: with SMTP id x15mr7348380pgt.243.1543651605871; Sat, 01 Dec 2018 00:06:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543651605; cv=none; d=google.com; s=arc-20160816; b=imGe+JCBAOlUsd2bFOzkNJkluKfC/mlshmpBsh5s/8uHQLunu1MRDp8id1wN+OxhvW i3SeGzJHN5NPWydY+xFK4API0EOaS1aFh351o89P+3ZX/6PkA6HFzlKm++8Tn61dKCAF Bp1Aycgimios9QDcn0lsFB/3nGf0llB+UcdE2IgupKEmMGXmGaC536SGCldu2hUE41E0 X81ktSvNJNJ5k4gWdp8PVxD6dEr5PaQbGugYBY9RlCTA3YZLm3rihSBLuxQ5jGwSLSMJ vaEE9ZAguR9rAjKliLZObBOI53J+R1LTOVpYGHhF4EgH1iDr5f4ElwXf83yr99VCcizL SpeQ== 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 :message-id:date:subject:cc:to:from; bh=VHpNPCieDzw9NAqJU5kl+1YihAbYL+0J27KiXNoyjls=; b=dIee3HuJeRhKVZgTTY9X9b8pEozCKau/eQorZUtwJQwV/7ggeT1fMUT8p1uSYndGTT 6VzhEhOQfJO138kSPnoqTQKhnZhFdKhSF745USUjqeVQt2tTtxHLi+piaB3bF1Humpz0 l/zlFjAFBVb1ijIoGTz4ZtZ/VSWm4HzmffaXj5sa8D4arkidIa+VZ5pdd/qeLNK2l/i/ UC0UgNHytTdhin0fJhMSOiJeqqDwFVXbzZjL/CRG/U+FhnSjhZbm7FY9lhbwBW6nWxCm HNiEUgpC85+7VTv2vGFkZu3gDv8S/9NwHE1A7pBZeZw79SXNX3EvfkiEQxBtosg9Cz9K eG2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s125si8706344pfc.60.2018.12.01.00.06.30; Sat, 01 Dec 2018 00:06:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726279AbeLATRv (ORCPT + 99 others); Sat, 1 Dec 2018 14:17:51 -0500 Received: from mxhk.zte.com.cn ([63.217.80.70]:10236 "EHLO mxhk.zte.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726135AbeLATRv (ORCPT ); Sat, 1 Dec 2018 14:17:51 -0500 Received: from mse01.zte.com.cn (unknown [10.30.3.20]) by Forcepoint Email with ESMTPS id C2AC8CA622C17CC4482A; Sat, 1 Dec 2018 16:05:50 +0800 (CST) Received: from notes_smtp.zte.com.cn ([10.30.1.239]) by mse01.zte.com.cn with ESMTP id wB1859GX039106; Sat, 1 Dec 2018 16:05:09 +0800 (GMT-8) (envelope-from wen.yang99@zte.com.cn) Received: from LIN-A6CB96A0603.zte.intra ([10.90.106.118]) by szsmtp06.zte.com.cn (Lotus Domino Release 8.5.3FP6) with ESMTP id 2018120116055556-14106847 ; Sat, 1 Dec 2018 16:05:55 +0800 From: Wen Yang To: Thomas Gleixner , Ingo Molnar , Konrad Rzeszutek Wilk , Josh Poimboeuf Cc: linux-kernel@vger.kernel.org, zhong.weidong@zte.com.cn, Wen Yang , "Peter Zijlstra (Intel)" , Peter Zijlstra , Mukesh Ojha Subject: [PATCH] cpu: Bool tests don't need comparisons Date: Sat, 1 Dec 2018 16:04:44 +0800 Message-Id: <20181201080444.9305-1-wen.yang99@zte.com.cn> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 X-MIMETrack: Itemize by SMTP Server on SZSMTP06/server/zte_ltd(Release 8.5.3FP6|November 21, 2013) at 2018-12-01 16:05:55, Serialize by Router on notes_smtp/zte_ltd(Release 9.0.1FP7|August 17, 2016) at 2018-12-01 16:04:50 Content-Transfer-Encoding: quoted-printable X-MAIL: mse01.zte.com.cn wB1859GX039106 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is the patch to the file cpu.c which fixes the following coccinelle warning: WARNING: Comparison to bool Signed-off-by: Wen Yang CC: Thomas Gleixner CC: Ingo Molnar CC: Konrad Rzeszutek Wilk CC: Josh Poimboeuf CC: "Peter Zijlstra (Intel)" CC: Peter Zijlstra CC: Mukesh Ojha CC: linux-kernel@vger.kernel.org --- kernel/cpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cpu.c b/kernel/cpu.c index 91d5c38eb7e5..5bdd7e150a11 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -1650,7 +1650,7 @@ int =5F=5Fcpuhp=5Fstate=5Fadd=5Finstance=5Fcpuslocked= (enum cpuhp=5Fstate state, lockdep=5Fassert=5Fcpus=5Fheld(); =20 sp =3D cpuhp=5Fget=5Fstep(state); - if (sp->multi=5Finstance =3D=3D false) + if (!sp->multi=5Finstance) return -EINVAL; =20 mutex=5Flock(&cpuhp=5Fstate=5Fmutex); --=20 2.19.1