summaryrefslogtreecommitdiff
path: root/block/blk-core.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2018-07-06 11:49:35 +0300
committerJens Axboe <axboe@kernel.dk>2018-07-09 18:07:54 +0300
commite9a83853302b339e63dea4072f6210e5a88ab4bb (patch)
treeb7994b3b7bbbe34f2d76ec4f055db9ebf0fd85f7 /block/blk-core.c
parentb88aef36b87c9787a4db724923ec4f57dfd513f3 (diff)
downloadlinux-e9a83853302b339e63dea4072f6210e5a88ab4bb.tar.xz
block: Add default switch case to blk_pm_allow_request() to kill warning
With gcc 4.9.0 and 7.3.0: block/blk-core.c: In function 'blk_pm_allow_request': block/blk-core.c:2747:2: warning: enumeration value 'RPM_ACTIVE' not handled in switch [-Wswitch] switch (rq->q->rpm_status) { ^ Convert the return statement below the switch() block into a default case to fix this. Fixes: e4f36b249b4d4e75 ("block: fix peeking requests during PM") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r--block/blk-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 687d7732f23a..c4b57d8806fe 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -2753,9 +2753,9 @@ static bool blk_pm_allow_request(struct request *rq)
return rq->rq_flags & RQF_PM;
case RPM_SUSPENDED:
return false;
+ default:
+ return true;
}
-
- return true;
}
#else
static bool blk_pm_allow_request(struct request *rq)