Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1963590ybb; Sun, 29 Mar 2020 18:27:10 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuG3bjIQED8RfL3SalkBWQQZvHM/gXrTtiXzu84DgUiCO1AmNcA7PE0EP9mcTF7nHLrmBG2 X-Received: by 2002:a9d:67c6:: with SMTP id c6mr2983369otn.11.1585531630223; Sun, 29 Mar 2020 18:27:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585531630; cv=none; d=google.com; s=arc-20160816; b=y5S/xpF2Eh+8c4knFsp4C0jc/NjFGxz2FNxaCwcwNXQQcsJYZiBehYEheqyw4nkZfQ O7SmFUzBf4kRzIzabdMj+h7oWbmVnjvLVvT7+uYed/mK21gamUOY0apEXBDZTuvDu3vF rSsno9xrNRlqnYpq2O3PIIoG0h3MVjecJtw1LSa4MuRQ5ICxfvCScU+2aMUO7UC6nEkP C8XNFBZFDTID31fXmxCcQch19MjvsSsLmDLQi+kMiwAlAY8/Y/c0sPt++HSq3UWaXF4+ TvwWlz+3D9gz9EJRVoKgJThNOznanHcOVUAMXWXJf1RLnhIhRyeLvWM78iReUnAUSshO 7HkQ== 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=NAZ/EvfI698xE822Hbx/zffuhB7jddf4RnbK84/Pvys=; b=SiOQciSzl+sl74q1dVj4NEnpRq54dUJ68CF6hNkOvOcnYMN0TJG0ojrBwxiQu1Gy4D g48+LDF+OZY3e7379gMJYqIEXoGrA1sHPbDcyt6n7hY61/06uGe5pw1MSlrxIiPxISjg ttDDU2WQv6+DpDUcswhWD8742j10W/6xpjpvLmOSVWe2a2G89G+HOdefYz90WVoZwwsx HRb1yf66MEg03dNL06lZTu4BLsIcSnSqe6pnSYGF6tLM+/xlpe7eSr/Qex1+O7bKE7PP U6GptD/w1WWORM72NjcbmzCijBN8s92G3/FxBjXYc5hxNLd/2UE3vC3cnN8y29L34Cpn no8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="YjMkp/aE"; 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 w16si5413137oti.167.2020.03.29.18.26.57; Sun, 29 Mar 2020 18:27:10 -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="YjMkp/aE"; 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 S1728490AbgC3BZO (ORCPT + 99 others); Sun, 29 Mar 2020 21:25:14 -0400 Received: from mail-wm1-f67.google.com ([209.85.128.67]:56253 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728470AbgC3BZM (ORCPT ); Sun, 29 Mar 2020 21:25:12 -0400 Received: by mail-wm1-f67.google.com with SMTP id r16so298110wmg.5 for ; Sun, 29 Mar 2020 18:25:09 -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=NAZ/EvfI698xE822Hbx/zffuhB7jddf4RnbK84/Pvys=; b=YjMkp/aEewC+Rdoc5lMigOXs09la/xhMMHhTVtnqpJkS9BVUJ5cHWjixLCgm1oT3pc u4+NF6cHnYvDDhRZARJilBYg6Te3ByREBGciPMR1CZsC+aZqc8waQOtfUqL7PAsSemgh nR8ghJZTlxbmXQXDqNGNtewt3SKa6A6Vk+7ShWPS1rNf5MlW8yWyK2fsh0bmmbu9bpzo zxKyJ6gzhGIxXTOQLq2FcpaGJfiFM+rQRUbyj4CnRuOKKDIMv3t1wlCRELy08eW//pKI GdLyffE5dGy4/Pa3cN/3sJ7L2FJz0sku9gz1Y4IvfGy/Exzij5Xhq2qHuq6/3SGAEtrY +qHw== 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=NAZ/EvfI698xE822Hbx/zffuhB7jddf4RnbK84/Pvys=; b=tKZHCocE29/UD2IKeE4UnRejolgSOC0UGTnmqsBeNUeVci8/F6Ix1l5DkNh+81o8et jDCoI0PZ/nvxO3jSZltTk5cPv11M0zE4hACW8/7Denh66IpV0TWoZx8hP2We1/8qoQJ9 lFQ8JPbXstqrvdD86LNDE83Uu7/w4Wl0paXtfC+ahmoJnnfHFZPMRA6byeXtNDpBvx9l IaCKJJvK0lUAIkA4+o8q3qYorO+Jx4PpzEPr2BZrzhSC9q134v1DIngEtT2fH5oea5g0 ZhldHn5hYdypiLoheAFf8Md7VdUdqZ2OFqMH0tAIXcrUjRQRPM7lLwKuczD2/bIaUI9O Nutg== X-Gm-Message-State: ANhLgQ0Q4o44Nhf0Jtx2EyebI0lq2/JOpmQ2R+Q4hc19ReDxm5ynldqA DnDzZ53+fPIjrHkv1Kdc5n52wdGNIDmw X-Received: by 2002:a1c:6885:: with SMTP id d127mr10655536wmc.33.1585531508775; Sun, 29 Mar 2020 18:25:08 -0700 (PDT) Received: from earth.lan (host-92-23-85-227.as13285.net. [92.23.85.227]) by smtp.gmail.com with ESMTPSA id f12sm18679545wmh.4.2020.03.29.18.25.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Mar 2020 18:25:08 -0700 (PDT) From: Jules Irenge To: linux-kernel@vger.kernel.org Cc: julia.lawall@lip6.fr, boqun.feng@gmail.com, Peter Zijlstra , Ingo Molnar , Will Deacon Subject: [PATCH v2 4/4] locking/rtmutex: Remove Comparison to bool Date: Mon, 30 Mar 2020 02:24:50 +0100 Message-Id: <20200330012450.312155-5-jbi.octave@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200330012450.312155-1-jbi.octave@gmail.com> References: <0/4> <20200330012450.312155-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 Coccinelle reports a warning inside __sched rt_mutex_slowunlock() WARNING: Comparison to bool To fix this, a comparison (==) of a bool type function result to value true together with the value are removed. 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