ソースを参照

[PATCH] deadline: clean up question mark operator

That ?: trick gives us the creeps.

Cc: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Andrew Morton 19 年 前
コミット
9d5c1e1bf2
1 ファイル変更4 行追加1 行削除
  1. 4 1
      drivers/block/deadline-iosched.c

+ 4 - 1
drivers/block/deadline-iosched.c

@@ -512,7 +512,10 @@ static int deadline_dispatch_requests(struct deadline_data *dd)
 	/*
 	 * batches are currently reads XOR writes
 	 */
-	drq = dd->next_drq[WRITE] ? : dd->next_drq[READ];
+	if (dd->next_drq[WRITE])
+		drq = dd->next_drq[WRITE];
+	else
+		drq = dd->next_drq[READ];
 
 	if (drq) {
 		/* we have a "next request" */