Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp5469589pxb; Wed, 26 Jan 2022 12:45:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJz8PNSjWc5018Q07wjP/dUUSjq/15yd0iF+XSZIF9wdI0uIsb/God9zQVkPZk4SJwaBci8b X-Received: by 2002:aa7:9904:: with SMTP id z4mr210444pff.68.1643229914902; Wed, 26 Jan 2022 12:45:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643229914; cv=none; d=google.com; s=arc-20160816; b=Z7jOpnZQCZhipHlrQ4+eUYf42BB+IzwyYhSOc08oyfIMFqPLQDJ1sn3sizF7D31o++ p9wqwnZ/4qPapl11tLfILbHjUckZjc9CyXyJBbpeas+iAubFo9RD+uVixFz8y65UzsbX SbWakuhwPbUXgu/oceqaKyZM5v8XHbnbRiyw7iHG5i85Kq1CrfJXybfGu5sOc9BgSmH1 3K+AksSMvUuazWYsoW+BPowlo9/pHtgL1LOJs2ohB39aMlrkUj1VtJCgRgvO/wlBMo8f ZDkEK1KXRqcggKODpmX+rx3d9P2hkwiR9z6oos5FgOScmW/0rKvP6rmP073lK5RWxpON sKbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=XjMF/h2PDouL1uBRf8gpQ5qaY/wOi+B+N6WmFgFh76o=; b=P+nhGHxUPT/i3bhdCqlm8LfwSXIItdlEn5pC39stZKvaaTvDEArzFtfm8ijEDn6W8P FCegOGSSr//wcHFkWJi8JOWBNltnMk0VZ0pHRQZsoJnUh3F7cAnr1ny91gxddg0TvijI xEOYEEDI559U4Z+xk54PDrDKW/n2MAOGZRt2+60kfq/+vDU8ZXd2sQ1G91OgtnJQdAag DNIr7cfTe2zgBGkjag3ULaKZZ4mrasRyWua39wqolJaWPMNi9AK8RSLFOyGCTstOR3jF o1rlvBkyylRhrZGeAKSIYu8tLDniwcAdlGF/D7iK9xZwv7QtK5OhElKIia6fRyAm1m1/ GwBA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i9si263166pgs.248.2022.01.26.12.45.02; Wed, 26 Jan 2022 12:45:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239104AbiAZJ0c (ORCPT + 99 others); Wed, 26 Jan 2022 04:26:32 -0500 Received: from szxga03-in.huawei.com ([45.249.212.189]:32122 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239092AbiAZJ0a (ORCPT ); Wed, 26 Jan 2022 04:26:30 -0500 Received: from canpemm500002.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4JkJDg2FrVz8wYP; Wed, 26 Jan 2022 17:23:31 +0800 (CST) Received: from huawei.com (10.175.124.27) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 26 Jan 2022 17:26:28 +0800 From: Miaohe Lin To: CC: , , Subject: [PATCH] mm/highmem: remove unnecessary done label Date: Wed, 26 Jan 2022 17:25:42 +0800 Message-ID: <20220126092542.64659-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove unnecessary done label to simplify the code. Signed-off-by: Miaohe Lin --- mm/highmem.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mm/highmem.c b/mm/highmem.c index 762679050c9a..0cc0c4da7ed9 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; } -- 2.23.0