diff mbox series

block/mq-deadline: Remove some unused functions

Message ID 20240419025610.34298-1-jiapeng.chong@linux.alibaba.com (mailing list archive)
State New, archived
Headers show
Series block/mq-deadline: Remove some unused functions | expand

Commit Message

Jiapeng Chong April 19, 2024, 2:56 a.m. UTC
These functions are defined in the mq-deadline.c file, but not called
elsewhere, so delete these unused functions.

block/mq-deadline.c:134:1: warning: unused function 'deadline_earlier_request'.
block/mq-deadline.c:148:1: warning: unused function 'deadline_latter_request'.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=8803
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 block/mq-deadline.c | 28 ----------------------------
 1 file changed, 28 deletions(-)

Comments

Jens Axboe April 19, 2024, 2:11 p.m. UTC | #1
On Fri, 19 Apr 2024 10:56:10 +0800, Jiapeng Chong wrote:
> These functions are defined in the mq-deadline.c file, but not called
> elsewhere, so delete these unused functions.
> 
> block/mq-deadline.c:134:1: warning: unused function 'deadline_earlier_request'.
> block/mq-deadline.c:148:1: warning: unused function 'deadline_latter_request'.
> 
> 
> [...]

Applied, thanks!

[1/1] block/mq-deadline: Remove some unused functions
      commit: 8294d49adbb06d7df8cfaca5a4f4eb9064a91b90

Best regards,
diff mbox series

Patch

diff --git a/block/mq-deadline.c b/block/mq-deadline.c
index dce8d746b5bd..94eede4fb9eb 100644
--- a/block/mq-deadline.c
+++ b/block/mq-deadline.c
@@ -127,34 +127,6 @@  static u8 dd_rq_ioclass(struct request *rq)
 	return IOPRIO_PRIO_CLASS(req_get_ioprio(rq));
 }
 
-/*
- * get the request before `rq' in sector-sorted order
- */
-static inline struct request *
-deadline_earlier_request(struct request *rq)
-{
-	struct rb_node *node = rb_prev(&rq->rb_node);
-
-	if (node)
-		return rb_entry_rq(node);
-
-	return NULL;
-}
-
-/*
- * get the request after `rq' in sector-sorted order
- */
-static inline struct request *
-deadline_latter_request(struct request *rq)
-{
-	struct rb_node *node = rb_next(&rq->rb_node);
-
-	if (node)
-		return rb_entry_rq(node);
-
-	return NULL;
-}
-
 /*
  * Return the first request for which blk_rq_pos() >= @pos.
  */