Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp2907900ybb; Fri, 27 Mar 2020 14:26:47 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvNC26Rky4YOAHLA8TZqvQrC0TrXJ0eq/o4PjrRVPW7eWoYgd3UoAeUmV7wGoF6Vgn8yzfZ X-Received: by 2002:a05:6830:1f56:: with SMTP id u22mr587658oth.55.1585344407292; Fri, 27 Mar 2020 14:26:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585344407; cv=none; d=google.com; s=arc-20160816; b=g3CSDw/H60u0jid7CMAG+T/enEFXPusuNnkpD5PqaBEMV0BcBw0C7G9kAaQUwnt2Eu bgJq13/Y7k8N3AQLwkoR+pLCFRscFY3IhZCWQNmlLLmEESGvrIWG/YjQP4qf1aatGvGx Dv3sL4U/AKW2m9A5L7BNyJrcRVS35wJGOSZaEATrRz5+L+/9yX7N1GlZJGbBtsMMMjCq EqBg7bjJkUGzzWVyTpPpesVaN2UJWeG7C6N4PeIX0JVFH71fO9HyHp/HEK0hMbJSoBsi RRTcqXyKCAM7MfhFO64mStkE0jYZys7YsNyoBTTxBj9J/KSBijVUdBj+JNbemL6YX/cT fIlQ== 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:date:subject:cc:to:from :dkim-signature; bh=5BquKrGylR+F/TAd06QUGk5Bi631SaEukwkZX6gMl/s=; b=aS7eDwu3JRfIjtk2FVR3daEJyoRNc5EhbtUjbvFu6TnCNh5pTwXvVN0xiMZO+vXzwp BQ5L/K0u+dSzDPPk1dv7rEj4ee0kmEaJP67AryTQOZcHbelWg50qC2Gebs3ggqcM8VnQ aX720qErbvIMMQmyEVAmYPq4GIJKkbCSQTzVSrFKKJgcK/ofKtYO3NiBjwT/2kZugQx5 HP8EUzzucKteL0SVOvADl5jQt56je2mmZU0bFMJ7RHMjUcXEjHNkE7upNj1c2In3MX3I +1wj4prfsIOktAb08XpHHA/wbp89VJsXAf7AqW5+/TUa6vytEX5xLD4vgpECl2Cb3y8v Em2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jqpKq27S; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y67si2868389oia.184.2020.03.27.14.26.34; Fri, 27 Mar 2020 14:26:47 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jqpKq27S; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727549AbgC0VYU (ORCPT + 99 others); Fri, 27 Mar 2020 17:24:20 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:44458 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727473AbgC0VYT (ORCPT ); Fri, 27 Mar 2020 17:24:19 -0400 Received: by mail-wr1-f68.google.com with SMTP id m17so13194115wrw.11 for ; Fri, 27 Mar 2020 14:24:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5BquKrGylR+F/TAd06QUGk5Bi631SaEukwkZX6gMl/s=; b=jqpKq27SO0OBC3HYUmEm41cVVCj6r7pfGSj85YdYLwpZKowSXNQ7JTIFygdqnA1y9S WsOZzKvp0NXGskryByOC2HdRJmNUl53WDCU8U9l039oeVh5mtFG6kOQGwJbCCba4UqMX Vh90OYtDVdtwsTVZ1WgBS1tYgP108NGfuxA3MtY7wAPDcCxcC5I/WeKx8A8BjUdYMttt stdn9ny/ZFMvrtAMeu0JpyZf/vg0k/txuXEHcQY33u7TF075T5mAtyuSvCzzfb3NpH3m 9GEeMBZJW5l8Alw/4BAMZBfIpRFSt+Si4mdku8c016HaxKRv1tqF7q9TR1ljAqE6T/0m 8hOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5BquKrGylR+F/TAd06QUGk5Bi631SaEukwkZX6gMl/s=; b=njzaryTTa6pEQTFaj2L2y8DQ3WaeuoReMLI/GjA44gqfHi+rj1cmy1oKfKqgKLwtcU kndu7chOH5eczV5lOAaGNzu0vJ3Yo/+sL79P5akzct1Sndm0zdfga3X5AOtJPq6v46Zm eff56fi6kAYelYofvh4DA/uWS9zJWsZj4ErjbwerckBaSJbF8IvIPpdlG7+4ixvR51s0 QBNibYbsqniwc2C8Twbcl9rhMXpaPpVIpJko+IOsuPrT7ZJsWZtE6omTFilTkF0nKG1T gFv4rr4Jcggwto7beHzU0VvYt8+HfngE4687G658Asv6E7oAa183LZCjgJ7wQgkrmBEM hmew== X-Gm-Message-State: ANhLgQ0QdAqg7rT68aeVxra9E3hsB0LJqOTVN86GLNXRiHtiYR6gHSdG 4a28NJGyEQJs52t5KvRDrA== X-Received: by 2002:a5d:4fcf:: with SMTP id h15mr1498961wrw.262.1585344256023; Fri, 27 Mar 2020 14:24:16 -0700 (PDT) Received: from ninjahost.lan (host-92-23-82-35.as13285.net. [92.23.82.35]) by smtp.gmail.com with ESMTPSA id h132sm10215141wmf.18.2020.03.27.14.24.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Mar 2020 14:24:15 -0700 (PDT) From: Jules Irenge To: julia.lawall@lip6.fr Cc: boqun.feng@gmail.com, Jules Irenge , Peter Zijlstra , Ingo Molnar , Will Deacon , linux-kernel@vger.kernel.org (open list:LOCKING PRIMITIVES) Subject: [PATCH 01/10] locking/rtmutex: Remove Comparison to bool Date: Fri, 27 Mar 2020 21:23:48 +0000 Message-Id: <20200327212358.5752-2-jbi.octave@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200327212358.5752-1-jbi.octave@gmail.com> References: <0/10> <20200327212358.5752-1-jbi.octave@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jules Irenge Coccinelle reports a warning inside rt_mutex_slowunlock() WARNING: Comparison to bool To fix this, the comparison to bool is removed This not only fixes the issue but also removes the unnecessary comparison. Remove comparison to bool Signed-off-by: Jules Irenge --- kernel/locking/rtmutex.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c index 851bbb10819d..7289e7b26be4 100644 --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c @@ -1378,7 +1378,7 @@ static bool __sched rt_mutex_slowunlock(struct rt_mutex *lock, */ while (!rt_mutex_has_waiters(lock)) { /* Drops lock->wait_lock ! */ - if (unlock_rt_mutex_safe(lock, flags) == true) + if (unlock_rt_mutex_safe(lock, flags)) return false; /* Relock the rtmutex and try again */ raw_spin_lock_irqsave(&lock->wait_lock, flags); -- 2.25.1