Skip to content

Commit e9a8385

Browse files
geertuaxboe
authored andcommitted
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: e4f36b2 ("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>
1 parent b88aef3 commit e9a8385

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

block/blk-core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2753,9 +2753,9 @@ static bool blk_pm_allow_request(struct request *rq)
27532753
return rq->rq_flags & RQF_PM;
27542754
case RPM_SUSPENDED:
27552755
return false;
2756+
default:
2757+
return true;
27562758
}
2757-
2758-
return true;
27592759
}
27602760
#else
27612761
static bool blk_pm_allow_request(struct request *rq)

0 commit comments

Comments
 (0)