From: Miaohe Lin Date: Tue, 22 Mar 2022 21:48:01 +0000 (-0700) Subject: mm/highmem: remove unnecessary done label X-Git-Tag: v6.6.17~7963^2~40 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7a3f2263d72d5055a56bc52ce97f5ded7853a41e;p=platform%2Fkernel%2Flinux-rpi.git mm/highmem: remove unnecessary done label Remove unnecessary done label to simplify the code. Link: https://lkml.kernel.org/r/20220126092542.64659-1-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Muchun Song Reviewed-by: David Hildenbrand Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/highmem.c b/mm/highmem.c index 7626790..0cc0c4d 100644 --- a/mm/highmem.c +++ b/mm/highmem.c @@ -736,11 +736,11 @@ void *page_address(const struct page *page) list_for_each_entry(pam, &pas->lh, list) { if (pam->page == page) { ret = pam->virtual; - goto done; + break; } } } -done: + spin_unlock_irqrestore(&pas->lock, flags); return ret; } @@ -773,13 +773,12 @@ void set_page_address(struct page *page, void *virtual) list_for_each_entry(pam, &pas->lh, list) { if (pam->page == page) { list_del(&pam->list); - spin_unlock_irqrestore(&pas->lock, flags); - goto done; + break; } } spin_unlock_irqrestore(&pas->lock, flags); } -done: + return; }