From patchwork Sun Jan 22 08:35:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 9530847 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 A36546020B for ; Sun, 22 Jan 2017 08:35:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 95D9527DA4 for ; Sun, 22 Jan 2017 08:35:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 876CB28306; Sun, 22 Jan 2017 08:35:18 +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=ham 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 08F0D27DA4 for ; Sun, 22 Jan 2017 08:35:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751299AbdAVIfR (ORCPT ); Sun, 22 Jan 2017 03:35:17 -0500 Received: from mout.web.de ([212.227.15.3]:60729 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751065AbdAVIfQ (ORCPT ); Sun, 22 Jan 2017 03:35:16 -0500 Received: from [192.168.1.2] ([78.48.136.24]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MdI5T-1cnZY23QCB-00IV98; Sun, 22 Jan 2017 09:35:13 +0100 Subject: [PATCH 5/5] cfq-iosched: Adjust one function call together with a variable assignment To: linux-block@vger.kernel.org, Jens Axboe References: Cc: LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Message-ID: Date: Sun, 22 Jan 2017 09:35:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: X-Provags-ID: V03:K0:Ra1U5Rp7lmIAU0IWQqsAzYHVZuMqwP/GSYyp48OuEolOkqYaZDf /sNvGPeY05ensGzFZeqI566PCXl+JcU/fFmzKa66CduGBDiz0cVCKMcTis0TlWfjk3wRGk3 9CEYQ7s756sNpOxOMwMgUsn04PVW5ze4pevHw+0VU/c5hXa1EzZbb0LcDCQm9VCQ4gvBkbC g4Q/RGcpTTs1GgOwBcNXA== X-UI-Out-Filterresults: notjunk:1; V01:K0:XRK+vhLF644=:+p92vNLlPyzZvPJfE34+6t SqrfHtiVMC2qgCxqqeZ/GerBdVTrqaLolPWxgMDSeRdCzYZQ+nIgZkv2F0tYtzMbG8lGj9XXT r16Xou56ubVcU8ZbxtdEzo+OBjoJLqzRYoquDZqWZ3aOa3IDZbTIQr1ue4+0yc+0pRm7tZbPn wwa267EXInCpGRigUXEWFAsid+jKB09Fp/cE452hc3hpC2OnrgZmcSw9D46EWFN18Hp5j9S6P 2Wca22gBc6DqX9mOT5Iun5ogDqzLBhBNE87uSCWanVd1GYeZOtHKJu29Z0zcJNThcaYo+uUaY YTQVzBXd33qz/NQbaNxBH/Zu1QtdkvVlgTP42wxp4Zp4jreRBujBb5rIQu7xbKR9gbWGpTRny yyv4g4Ptf7EcLbkACSHYn3Qw5yvd55w9AG/a8H9PXmm41H2jlTR/tFY2QMax0WyMJf1XJvfoW wUQLRFlnv2nkNXrCGNIHogYhy4FRT68pP39xBinRPEI6ZUIIuzon7U+kssoTYGmVpzUmidiM9 RkZwDA9SglD07rFShJbXxbLcwtXHsMU4SRfAIWY5ID3IWDcVUiJWry8TcFQBeE7MneeieUvs/ aE+H3XYB7b+mLcKxwhsIT5gAlCmPJB+7jIzs5q+7k1avmU9T8vOd9gHZ7bkZ9EaRxsum7Im9K 6JyTkDWQYATHqAksoH23WyzEkMF4NGsbBLoLmGc+Gx8fcUGoo4nWyRwFPbkGZJQ4V5yx/880z VxfdBJnmv2GT6E7l6QkdkwajJL/BK3dcgzIQNQfQAqjmCWhNWuLR9GZXMdN8ED8mhDSl+0rzf IPIQbPM 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 From: Markus Elfring Date: Sat, 21 Jan 2017 22:44:07 +0100 The script "checkpatch.pl" pointed information out like the following. ERROR: do not use assignment in if condition Thus fix the affected source code place. Signed-off-by: Markus Elfring Reviewed-by: Johannes Thumshirn --- block/cfq-iosched.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 454297fe8fd6..8c405eaa2806 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -2750,9 +2750,11 @@ static struct cfq_queue *cfq_get_next_queue_forced(struct cfq_data *cfqd) if (!cfqg) return NULL; - for_each_cfqg_st(cfqg, i, j, st) - if ((cfqq = cfq_rb_first(st)) != NULL) + for_each_cfqg_st(cfqg, i, j, st) { + cfqq = cfq_rb_first(st); + if (cfqq) return cfqq; + } return NULL; }