From: Falla Coulibaly Date: Wed, 18 Aug 2021 21:47:40 +0000 (-0500) Subject: PM: hibernate: Remove blk_status_to_errno in hib_wait_io X-Git-Tag: v6.1-rc5~2752^2~2^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5416da01ff6e7275f9a4cfd7ff99e6b12b8dc2a8;p=platform%2Fkernel%2Flinux-starfive.git PM: hibernate: Remove blk_status_to_errno in hib_wait_io blk_status_to_errno doesn't appear to perform extra work besides converting blk_status_t to integer. This patch removes that unnecessary conversion as the return type of the function is blk_status_t. Signed-off-by: Falla Coulibaly Signed-off-by: Rafael J. Wysocki --- diff --git a/kernel/power/swap.c b/kernel/power/swap.c index 3cb89ba..9ec4189 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c @@ -306,7 +306,7 @@ static blk_status_t hib_wait_io(struct hib_bio_batch *hb) * a plug will flush the plug list before sleeping. */ wait_event(hb->wait, atomic_read(&hb->count) == 0); - return blk_status_to_errno(hb->error); + return hb->error; } /*