linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers: block: use set_current_state macro
@ 2020-05-07  7:12 Xu Wang
  2020-05-16  4:27 ` Chaitanya Kulkarni
  2020-05-16 20:29 ` Jens Axboe
  0 siblings, 2 replies; 3+ messages in thread
From: Xu Wang @ 2020-05-07  7:12 UTC (permalink / raw)
  To: axboe; +Cc: linux-block, linux-kernel

Use set_current_state macro instead of current->state = TASK_RUNNING.

Signed-off-by: Xu Wang <vulab@iscas.ac.cn>
---
 drivers/block/swim.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 4c297f69171d..dd34504382e5 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -327,7 +327,7 @@ static inline void swim_motor(struct swim __iomem *base,
 			swim_select(base, RELAX);
 			if (swim_readbit(base, MOTOR_ON))
 				break;
-			current->state = TASK_INTERRUPTIBLE;
+			set_current_state(TASK_INTERRUPTIBLE);
 			schedule_timeout(1);
 		}
 	} else if (action == OFF) {
@@ -346,7 +346,7 @@ static inline void swim_eject(struct swim __iomem *base)
 		swim_select(base, RELAX);
 		if (!swim_readbit(base, DISK_IN))
 			break;
-		current->state = TASK_INTERRUPTIBLE;
+		set_current_state(TASK_INTERRUPTIBLE);
 		schedule_timeout(1);
 	}
 	swim_select(base, RELAX);
@@ -370,7 +370,7 @@ static inline int swim_step(struct swim __iomem *base)
 
 	for (wait = 0; wait < HZ; wait++) {
 
-		current->state = TASK_INTERRUPTIBLE;
+		set_current_state(TASK_INTERRUPTIBLE);
 		schedule_timeout(1);
 
 		swim_select(base, RELAX);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drivers: block: use set_current_state macro
  2020-05-07  7:12 [PATCH] drivers: block: use set_current_state macro Xu Wang
@ 2020-05-16  4:27 ` Chaitanya Kulkarni
  2020-05-16 20:29 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Chaitanya Kulkarni @ 2020-05-16  4:27 UTC (permalink / raw)
  To: Xu Wang, axboe; +Cc: linux-block, linux-kernel

On 05/07/2020 12:20 AM, Xu Wang wrote:
> Use set_current_state macro instead of current->state = TASK_RUNNING.
>
> Signed-off-by: Xu Wang<vulab@iscas.ac.cn>

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drivers: block: use set_current_state macro
  2020-05-07  7:12 [PATCH] drivers: block: use set_current_state macro Xu Wang
  2020-05-16  4:27 ` Chaitanya Kulkarni
@ 2020-05-16 20:29 ` Jens Axboe
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2020-05-16 20:29 UTC (permalink / raw)
  To: Xu Wang; +Cc: linux-block, linux-kernel

On 5/7/20 1:12 AM, Xu Wang wrote:
> Use set_current_state macro instead of current->state = TASK_RUNNING.

Applied, thanks.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-16 20:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07  7:12 [PATCH] drivers: block: use set_current_state macro Xu Wang
2020-05-16  4:27 ` Chaitanya Kulkarni
2020-05-16 20:29 ` Jens Axboe

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).