Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e9a83853 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Jens Axboe
Browse files

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: e4f36b24 ("block: fix peeking requests during PM")
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent b88aef36
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2753,10 +2753,10 @@ static bool blk_pm_allow_request(struct request *rq)
		return rq->rq_flags & RQF_PM;
	case RPM_SUSPENDED:
		return false;
	}

	default:
		return true;
	}
}
#else
static bool blk_pm_allow_request(struct request *rq)
{