From patchwork Fri Sep 14 01:35:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yue Haibing X-Patchwork-Id: 10600239 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A2B4D157B for ; Fri, 14 Sep 2018 01:25:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5C9A2B31C for ; Fri, 14 Sep 2018 01:25:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D742E2B321; Fri, 14 Sep 2018 01:25:28 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 756EB2B31C for ; Fri, 14 Sep 2018 01:25:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727011AbeINGh1 (ORCPT ); Fri, 14 Sep 2018 02:37:27 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:12114 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726771AbeINGh0 (ORCPT ); Fri, 14 Sep 2018 02:37:26 -0400 Received: from DGGEMS404-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 7DD2C68AC6C27; Fri, 14 Sep 2018 09:25:23 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS404-HUB.china.huawei.com (10.3.19.204) with Microsoft SMTP Server id 14.3.399.0; Fri, 14 Sep 2018 09:25:14 +0800 From: YueHaibing To: Jens Axboe CC: YueHaibing , , Subject: [PATCH -next] blk-iolatency: remove set but not used variables 'changed' and 'blkiolat' Date: Fri, 14 Sep 2018 01:35:11 +0000 Message-ID: <1536888911-54172-1-git-send-email-yuehaibing@huawei.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected 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 Fixes gcc '-Wunused-but-set-variable' warning: block/blk-iolatency.c: In function 'scale_change': block/blk-iolatency.c:301:7: warning: variable 'changed' set but not used [-Wunused-but-set-variable] block/blk-iolatency.c: In function 'iolatency_set_limit': block/blk-iolatency.c:765:24: warning: variable 'blkiolat' set but not used [-Wunused-but-set-variable] Signed-off-by: YueHaibing --- block/blk-iolatency.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c index 8793f13..d048a92 100644 --- a/block/blk-iolatency.c +++ b/block/blk-iolatency.c @@ -298,7 +298,6 @@ static void scale_change(struct iolatency_grp *iolat, bool up) unsigned long qd = blk_queue_depth(iolat->blkiolat->rqos.q); unsigned long scale = scale_amount(qd, up); unsigned long old = iolat->rq_depth.max_depth; - bool changed = false; if (old > qd) old = qd; @@ -308,7 +307,6 @@ static void scale_change(struct iolatency_grp *iolat, bool up) return; if (old < qd) { - changed = true; old += scale; old = min(old, qd); iolat->rq_depth.max_depth = old; @@ -316,7 +314,6 @@ static void scale_change(struct iolatency_grp *iolat, bool up) } } else if (old > 1) { old >>= 1; - changed = true; iolat->rq_depth.max_depth = max(old, 1UL); } } @@ -762,7 +759,6 @@ static ssize_t iolatency_set_limit(struct kernfs_open_file *of, char *buf, { struct blkcg *blkcg = css_to_blkcg(of_css(of)); struct blkcg_gq *blkg; - struct blk_iolatency *blkiolat; struct blkg_conf_ctx ctx; struct iolatency_grp *iolat; char *p, *tok; @@ -775,7 +771,6 @@ static ssize_t iolatency_set_limit(struct kernfs_open_file *of, char *buf, return ret; iolat = blkg_to_lat(ctx.blkg); - blkiolat = iolat->blkiolat; p = ctx.body; ret = -EINVAL;