LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] block/mq-deadline: Fix compilation warning.
@ 2021-09-02 11:20 Imran Khan
  0 siblings, 0 replies; only message in thread
From: Imran Khan @ 2021-09-02 11:20 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, linux-kernel

dd_queued is only being used by show function corresponding to queued
attribute. So compilation without BLK_DEBUG_FS gives unused-function
warning for dd_queued.
Move dd_queued under BLK_DEBUG_FS to fix compilation issue.

Fixes: 7b05bf771084 ("Revert "block/mq-deadline: Prioritize high-priority requests"")

Signed-off-by: Imran Khan <imran.f.khan@oracle.com>
---
 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 3c3693c34f061..3c45838daf12c 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])
@@ -926,6 +920,12 @@ DEADLINE_DEBUGFS_DDIR_ATTRS(DD_IDLE_PRIO, DD_READ, read2);
 DEADLINE_DEBUGFS_DDIR_ATTRS(DD_IDLE_PRIO, DD_WRITE, write2);
 #undef DEADLINE_DEBUGFS_DDIR_ATTRS
 
+/* 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);
+}
+
 static int deadline_batching_show(void *data, struct seq_file *m)
 {
 	struct request_queue *q = data;
-- 
2.30.2


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-02 11:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-02 11:20 [PATCH] block/mq-deadline: Fix compilation warning Imran Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).