Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp872918pxb; Wed, 1 Sep 2021 11:48:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNFcRVq3p3AR4jPnF9WlVuDnFQ5iDEq8iXZGc8XgDE1had94+kdT07KbLpHJCEUm/u2/OB X-Received: by 2002:a05:6e02:184a:: with SMTP id b10mr674669ilv.90.1630522101572; Wed, 01 Sep 2021 11:48:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630522101; cv=none; d=google.com; s=arc-20160816; b=bQv4SYU+GGzCKmhhH+b6qwnh9CcsNuSgPlv35Zp70khzbSuBgfwvVj1EvVqv/1QSaK /OSq2myY/VbMI2XwbH/G4Dj8hhuMmtVjNs0G8XMfvA8YwvxqiUEwF01nYoAxrW4UaJIv eoKzwOFY1TICni0AwZcklTfZaCCeRylkQYTrngrpSMKTxT7ZV6GCk6mcNXjcxZo2vodN 3/ARGpa2fIzJFfcIFCs6uTDxCj0iVfbcZ92KGMYfWIGTaabe6/5fyIuY1fNb2Mvzm1Up CHKWJFid64VNlWnHa1X0/GlTVmtKYcp8Ctvw0kkOGUTjwe253qM1Fkqo2Z6RtEFvH79v QxYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=EhGlBomIN4G2LKzVRZovfPT+eK7Hf4CmUltod0Q0K84=; b=RzgjzaKAUnREm+Fcwzdwj3XhgxDNYqI9PtPgSNVJjPy+vkiT290Un2wWGKJChjkBlz RDJzkRzaESeXXeZSycTWqMZFPsi5tA3P+AFTRgfpn1yGl6HYmlq46JU5BhKQGsOxtcM2 JEWf1rCJoqBrPNwEXrAmG5PDjQ9WoF9mLIEIE1F/slrJtr7J5HgkWvWJkbp2LEC4xl3P enff6cFlv88UTOb4/V9WSxL/DnQcOPzVpC3HtnBHjpNCsKAkMbQz5tvlq6+NAK3QLHq/ r80zn4pcIaDL2D9CK+Wg8WPF1EE4cHPJBWWCSD66LmXCWFKcuA+5UPIZo9CADE2qXclS pKFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 12si442677ilx.115.2021.09.01.11.48.10; Wed, 01 Sep 2021 11:48:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242397AbhIAGsF (ORCPT + 99 others); Wed, 1 Sep 2021 02:48:05 -0400 Received: from out30-57.freemail.mail.aliyun.com ([115.124.30.57]:39446 "EHLO out30-57.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242386AbhIAGsE (ORCPT ); Wed, 1 Sep 2021 02:48:04 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01424;MF=tianjia.zhang@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0Umr7Ulw_1630478825; Received: from localhost(mailfrom:tianjia.zhang@linux.alibaba.com fp:SMTPD_---0Umr7Ulw_1630478825) by smtp.aliyun-inc.com(127.0.0.1); Wed, 01 Sep 2021 14:47:06 +0800 From: Tianjia Zhang To: Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Tianjia Zhang Subject: [PATCH] block/mq-deadline: Fix unused-function compilation warning Date: Wed, 1 Sep 2021 14:47:05 +0800 Message-Id: <20210901064705.55071-1-tianjia.zhang@linux.alibaba.com> X-Mailer: git-send-email 2.19.1.3.ge56e4f7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If CONFIG_BLK_DEBUG_FS is not defined, the following compilation warning will be reported: block/mq-deadline.c:274:12: warning: ‘dd_queued’ defined but not used [-Wunused-function] static u32 dd_queued(struct deadline_data *dd, enum dd_prio prio) Move the function dd_queued() to the scope of this config and mark it inline. Signed-off-by: Tianjia Zhang --- block/mq-deadline.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/block/mq-deadline.c b/block/mq-deadline.c index 3c3693c34f06..084314ee878d 100644 --- a/block/mq-deadline.c +++ b/block/mq-deadline.c @@ -270,12 +270,6 @@ deadline_move_request(struct deadline_data *dd, struct dd_per_prio *per_prio, deadline_remove_request(rq->q, per_prio, rq); } -/* Number of requests queued for a given priority level. */ -static u32 dd_queued(struct deadline_data *dd, enum dd_prio prio) -{ - return dd_sum(dd, inserted, prio) - dd_sum(dd, completed, prio); -} - /* * deadline_check_fifo returns 0 if there are no expired requests on the fifo, * 1 otherwise. Requires !list_empty(&dd->fifo_list[data_dir]) @@ -953,6 +947,12 @@ static int dd_async_depth_show(void *data, struct seq_file *m) return 0; } +/* Number of requests queued for a given priority level. */ +static inline u32 dd_queued(struct deadline_data *dd, enum dd_prio prio) +{ + return dd_sum(dd, inserted, prio) - dd_sum(dd, completed, prio); +} + static int dd_queued_show(void *data, struct seq_file *m) { struct request_queue *q = data; -- 2.19.1.3.ge56e4f7