From patchwork Sat Oct 7 14:02:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Meyer X-Patchwork-Id: 9991351 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 40C7060364 for ; Sat, 7 Oct 2017 14:26:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3409C28B2C for ; Sat, 7 Oct 2017 14:26:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28CDF28B93; Sat, 7 Oct 2017 14:26:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D948D28B2C for ; Sat, 7 Oct 2017 14:26:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753128AbdJGOYK (ORCPT ); Sat, 7 Oct 2017 10:24:10 -0400 Received: from www17.your-server.de ([213.133.104.17]:44208 "EHLO www17.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753010AbdJGOYI (ORCPT ); Sat, 7 Oct 2017 10:24:08 -0400 Received: from [95.222.27.204] (helo=olymp) by www17.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.85_2) (envelope-from ) id 1e0q1M-00030I-Cr; Sat, 07 Oct 2017 16:24:04 +0200 Subject: [PATCH] bfq: Fix bool initialization/comparison From: Thomas Meyer To: paolo.valente@linaro.org, axboe@kernel.dk, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Mime-Version: 1.0 X-Patch: Cocci Message-ID: <1507383097082-1668690714-1-diffsplit-thomas@m3y3r.de> References: <1507383097081-778026979-0-diffsplit-thomas@m3y3r.de> In-Reply-To: <1507383097081-778026979-0-diffsplit-thomas@m3y3r.de> X-Serial-No: 1 Date: Sat, 07 Oct 2017 16:02:21 +0200 X-Mailer: Evolution 3.22.6-1 X-Authenticated-Sender: thomas@m3y3r.de X-Virus-Scanned: Clear (ClamAV 0.99.2/23919/Sat Oct 7 14:40:59 2017) Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Bool initializations should use true and false. Bool tests don't need comparisons. Signed-off-by: Thomas Meyer diff -u -p a/block/bfq-iosched.c b/block/bfq-iosched.c --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -4986,7 +4986,7 @@ static ssize_t bfq_low_latency_store(str if (__data > 1) __data = 1; - if (__data == 0 && bfqd->low_latency != 0) + if (__data == 0 && bfqd->low_latency) bfq_end_wr(bfqd); bfqd->low_latency = __data;