* [PATCH] block: Remove unused blk_pm_*() function definitions
@ 2021-02-22 2:28 Bart Van Assche
2021-02-22 3:52 ` Chaitanya Kulkarni
2021-02-22 13:34 ` Jens Axboe
0 siblings, 2 replies; 3+ messages in thread
From: Bart Van Assche @ 2021-02-22 2:28 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block, Christoph Hellwig, Bart Van Assche, Alan Stern
Commit a1ce35fa4985 ("block: remove dead elevator code") removed the last
callers of blk_pm_requeue_request(), blk_pm_add_request() and
blk_pm_put_request(). Hence remove the definitions of these functions.
Removing these functions removes all users of the struct request nr_pending
member. Hence also remove 'nr_pending'. Note: 'nr_pending' is no longer
used since commit 7cedffec8e75 ("block: Make blk_get_request() block for
non-PM requests while suspended").
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
block/blk-pm.h | 38 --------------------------------------
include/linux/blkdev.h | 1 -
2 files changed, 39 deletions(-)
diff --git a/block/blk-pm.h b/block/blk-pm.h
index a2283cc9f716..8a5a0d4b357f 100644
--- a/block/blk-pm.h
+++ b/block/blk-pm.h
@@ -21,31 +21,6 @@ static inline void blk_pm_mark_last_busy(struct request *rq)
if (rq->q->dev && !(rq->rq_flags & RQF_PM))
pm_runtime_mark_last_busy(rq->q->dev);
}
-
-static inline void blk_pm_requeue_request(struct request *rq)
-{
- lockdep_assert_held(&rq->q->queue_lock);
-
- if (rq->q->dev && !(rq->rq_flags & RQF_PM))
- rq->q->nr_pending--;
-}
-
-static inline void blk_pm_add_request(struct request_queue *q,
- struct request *rq)
-{
- lockdep_assert_held(&q->queue_lock);
-
- if (q->dev && !(rq->rq_flags & RQF_PM))
- q->nr_pending++;
-}
-
-static inline void blk_pm_put_request(struct request *rq)
-{
- lockdep_assert_held(&rq->q->queue_lock);
-
- if (rq->q->dev && !(rq->rq_flags & RQF_PM))
- --rq->q->nr_pending;
-}
#else
static inline int blk_pm_resume_queue(const bool pm, struct request_queue *q)
{
@@ -55,19 +30,6 @@ static inline int blk_pm_resume_queue(const bool pm, struct request_queue *q)
static inline void blk_pm_mark_last_busy(struct request *rq)
{
}
-
-static inline void blk_pm_requeue_request(struct request *rq)
-{
-}
-
-static inline void blk_pm_add_request(struct request_queue *q,
- struct request *rq)
-{
-}
-
-static inline void blk_pm_put_request(struct request *rq)
-{
-}
#endif
#endif /* _BLOCK_BLK_PM_H_ */
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 69035e9f632b..c032cfe133c7 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -462,7 +462,6 @@ struct request_queue {
#ifdef CONFIG_PM
struct device *dev;
enum rpm_status rpm_status;
- unsigned int nr_pending;
#endif
/*
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] block: Remove unused blk_pm_*() function definitions
2021-02-22 2:28 [PATCH] block: Remove unused blk_pm_*() function definitions Bart Van Assche
@ 2021-02-22 3:52 ` Chaitanya Kulkarni
2021-02-22 13:34 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Chaitanya Kulkarni @ 2021-02-22 3:52 UTC (permalink / raw)
To: Bart Van Assche, Jens Axboe; +Cc: linux-block, Christoph Hellwig, Alan Stern
On 2/21/21 18:29, Bart Van Assche wrote:
> Commit a1ce35fa4985 ("block: remove dead elevator code") removed the last
> callers of blk_pm_requeue_request(), blk_pm_add_request() and
> blk_pm_put_request(). Hence remove the definitions of these functions.
> Removing these functions removes all users of the struct request nr_pending
> member. Hence also remove 'nr_pending'. Note: 'nr_pending' is no longer
> used since commit 7cedffec8e75 ("block: Make blk_get_request() block for
> non-PM requests while suspended").
>
> Cc: Alan Stern <stern@rowland.harvard.edu>
> Cc: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Looks good.
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] block: Remove unused blk_pm_*() function definitions
2021-02-22 2:28 [PATCH] block: Remove unused blk_pm_*() function definitions Bart Van Assche
2021-02-22 3:52 ` Chaitanya Kulkarni
@ 2021-02-22 13:34 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2021-02-22 13:34 UTC (permalink / raw)
To: Bart Van Assche; +Cc: linux-block, Christoph Hellwig, Alan Stern
On 2/21/21 7:28 PM, Bart Van Assche wrote:
> Commit a1ce35fa4985 ("block: remove dead elevator code") removed the last
> callers of blk_pm_requeue_request(), blk_pm_add_request() and
> blk_pm_put_request(). Hence remove the definitions of these functions.
> Removing these functions removes all users of the struct request nr_pending
> member. Hence also remove 'nr_pending'. Note: 'nr_pending' is no longer
> used since commit 7cedffec8e75 ("block: Make blk_get_request() block for
> non-PM requests while suspended").
Applied, thanks.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-02-22 13:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-22 2:28 [PATCH] block: Remove unused blk_pm_*() function definitions Bart Van Assche
2021-02-22 3:52 ` Chaitanya Kulkarni
2021-02-22 13:34 ` Jens Axboe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.