block: Omit a redundant pm_runtime_mark_last_busy() call in blk_post_runtime_resume()
Subsystems (2)
PATCH 1/1 block: Omit a redundant pm_runtime_mark_last_busy() call in blk_post_runtime_resume()
From: Markus Elfring <[email protected]>
Date: Sat, 14 Mar 2026 15:06:37 +0100
The device's last busy timestamp was set in a wrapper function since the commit 18c1fe53d186867243f4cf17f4eef60737a16c4c ("PM: runtime:
Mark last busy stamp in pm_request_autosuspend()").
Thus delete a pm_runtime_mark_last_busy() call before
a pm_request_autosuspend() call.
The source code was transformed by using the Coccinelle software.
--- block/blk-pm.c | 1 - 1 file changed, 1 deletion(-)
block/blk-pm.c +0 -1
@@ -181,7 +181,6 @@ void blk_post_runtime_resume(struct request_queue *q)spin_lock_irq (&q->queue_lock); old_status = q->rpm_status; q->rpm_status =RPM_ACTIVE ; -pm_runtime_mark_last_busy (q->dev);pm_request_autosuspend (q->dev);spin_unlock_irq (&q->queue_lock);
Signature · 1 line
2.53.0
Quoted 18 lines · Markus Elfring
The device's last busy timestamp was set in a wrapper function since the commit
18c1fe53d186867243f4cf17f4eef60737a16c4c("PM: runtime:
Mark last busy stamp inpm_request_autosuspend()").
Thus delete apm_runtime_mark_last_busy()call before
apm_request_autosuspend()call.The source code was transformed by using the Coccinelle software.
Signed-off-by Markus Elfring <[email protected]>--- block/blk-pm.c | 1 - 1 file changed, 1 deletion(-)block/blk-pm.c +0
-0
block/blk-pm.c void blk_post_runtime_resume(struct request_queue *q) · line 186
Quoted 7 lines
block/blk-pm.c +0
-1@@ -181,7 +181,6 @@ void blk_post_runtime_resume(struct request_queue *q)spin_lock_irq (&q->queue_lock); old_status = q->rpm_status; q->rpm_status =RPM_ACTIVE ; -pm_runtime_mark_last_busy (q->dev);pm_request_autosuspend (q->dev);spin_unlock_irq (&q->queue_lock);
Isn't it expected that the Coccinelle script is shared when a patch is posted that has been generated by Coccinelle? Anyway:
Quoted 2 lines
Isn't it expected that the Coccinelle script is shared when a patch is posted that has been generated by Coccinelle?
How do you think about to take another look at a related contribution?
[PATCH] Coccinelle: api: Add SmPL script “pm_runtime_mark_last_busy-deletion.cocci”
https://lore.kernel.org/cocci/[email protected]/
https://sympa.inria.fr/sympa/arc/cocci/2026-03/msg00117.html
Regards,
Markus