From patchwork Mon Aug 22 08:25:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukas Bulwahn X-Patchwork-Id: 12950346 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84A6AC28D13 for ; Mon, 22 Aug 2022 08:27:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 23E398D0005; Mon, 22 Aug 2022 04:27:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1ED428D0001; Mon, 22 Aug 2022 04:27:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0B5808D0005; Mon, 22 Aug 2022 04:27:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id EDCBE8D0001 for ; Mon, 22 Aug 2022 04:27:20 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id CB410160837 for ; Mon, 22 Aug 2022 08:27:20 +0000 (UTC) X-FDA: 79826549040.06.657F168 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by imf06.hostedemail.com (Postfix) with ESMTP id C7C02180098 for ; Mon, 22 Aug 2022 08:25:52 +0000 (UTC) Received: by mail-wr1-f50.google.com with SMTP id bq11so5639568wrb.12 for ; Mon, 22 Aug 2022 01:25:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:subject:cc:to:from:from:to:cc; bh=ZQMxC8SQcK7D46DZF5jtDRzGw0Z16LiNuM+Bzk2aJSo=; b=OLNL7exAXaIJduiNgoQCsJ6rZMgitXCim/HKlxMgBRRUMCxtAAGNXtBtdJheaqg3pC TliuMGd3pDcTM0WkGacO/UZyKRKECjlG9Ivq6S5pkWzazG/SiSWx1c22mT9jRaFgdULc uKtdOp8YucD7O/pNet+Y6K5EyTp5iQwS1AqbAP1Jmkl4bXT2K8HjhmnI5SUL5R3SjuSV wFYxO3P1vtwx1gJuNwHXyzk0gGnBpf1Wqs4fFBhoAFAonxxG3aOXc7mMbBu4OlCxcg0S PALZyKiXSsboDOgNWyC5yTxYoPEifsTcDhQb6avJ9/RCrwlMmkA/31s2jiE6pkks3ayk gPtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=ZQMxC8SQcK7D46DZF5jtDRzGw0Z16LiNuM+Bzk2aJSo=; b=nuzR671S230I6GdQsZpUppmVok5b2cIPz883nY81t/fvEl228qDd7sOlwWRjUrn0n8 gPxBnEmaRC7O93GDSywkiaj6DUFMrpeGsGGjkoyixadaB8kxBxz3LSffsGUez9PWKCNI sKprqzQtQCBrrKTbCr3v5Vm+8bC4/69QJfO4ud/Nlty+DO2Ptn2KXxQBVY1UHwRumdb2 JclWP8UhMx4vMPTI8cBGQWPL0bWQq+6KRIMv6V/woXlyLomGMZ4pgZD8qOgnVTTmwDe7 JBxAkSrmWJB6jgt8QxRWaEweSN95je+ANVoG+YQUaY13olAHU6xdeIxfa6TvpsfUmVk2 wnPw== X-Gm-Message-State: ACgBeo2OHOGXTq7vnyr6dMogV0X1VGNYSXSglj+BBhfFQe3uGsVBnrqO S/AekeL68M7rojNCMovZT+s= X-Google-Smtp-Source: AA6agR7sv04KNDMmxFOJpvl9C2FbEVaKWNy3FaYLC+PE0f+To+BYbZRu8vRj6lpsja472y0AXYkGnw== X-Received: by 2002:a5d:47c9:0:b0:225:5a4f:8f82 with SMTP id o9-20020a5d47c9000000b002255a4f8f82mr1877881wrc.0.1661156751316; Mon, 22 Aug 2022 01:25:51 -0700 (PDT) Received: from felia.fritz.box (200116b826f28600ec06010f612e4c3e.dip.versatel-1u1.de. [2001:16b8:26f2:8600:ec06:10f:612e:4c3e]) by smtp.gmail.com with ESMTPSA id m30-20020a05600c3b1e00b003a6077384ecsm17912800wms.31.2022.08.22.01.25.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Aug 2022 01:25:50 -0700 (PDT) From: Lukas Bulwahn To: Miaohe Lin , Mike Kravetz , Muchun Song , Andrew Morton , linux-mm@kvack.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Lukas Bulwahn Subject: [PATCH] mm/hugetlb: remove unused local variable dst_entry in copy_hugetlb_page_range() Date: Mon, 22 Aug 2022 10:25:25 +0200 Message-Id: <20220822082525.26071-1-lukas.bulwahn@gmail.com> X-Mailer: git-send-email 2.17.1 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661156752; a=rsa-sha256; cv=none; b=g6vgGDgxAAlabXEm+Mi/BGxPCB+wY57qTfc+8ne6ikRNpywtTsBpy56I6+92u2+HLp2KU5 yVJBjB44eXoq5OVHmCnO1eiYee4VpCmESXNlFPxFXgJoIqEK4Vypxfqo/N6rmG+i1Kv3lN E4En4+0R0hwhRB9xQhl+/iW6ucNhY2U= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=OLNL7exA; spf=pass (imf06.hostedemail.com: domain of lukas.bulwahn@gmail.com designates 209.85.221.50 as permitted sender) smtp.mailfrom=lukas.bulwahn@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661156752; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references:dkim-signature; bh=ZQMxC8SQcK7D46DZF5jtDRzGw0Z16LiNuM+Bzk2aJSo=; b=55nHWV430GuZqsDYLiZ2AR70N4c72t7jaCMuzkhhzul8WXrwLc4S7AdNdHbyzPaLl2+5ck LI8eiwgpemxUAg56/tuUD6BDIk+vD19y9vYi6YMjG2kjroAJS9QHVynuSXITaVGPmvbIOZ o4hybL8jPlhKr+XIbSrDUW7mMaVTwjw= X-Stat-Signature: f37b3bxj6ecw5nc989owxzuagwyzq5wm X-Rspamd-Queue-Id: C7C02180098 Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=OLNL7exA; spf=pass (imf06.hostedemail.com: domain of lukas.bulwahn@gmail.com designates 209.85.221.50 as permitted sender) smtp.mailfrom=lukas.bulwahn@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspam-User: X-Rspamd-Server: rspam10 X-HE-Tag: 1661156752-26653 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Commit a0e4f7b82610 ("mm/hugetlb: make detecting shared pte more reliable") modifies copy_hugetlb_page_range() such that huge_ptep_get(dst_pte) and the local variable dst_entry is not used explicitly in this function. Remove this unused local variable dst_entry in copy_hugetlb_page_range(). No functional change. Signed-off-by: Lukas Bulwahn Reviewed-by: Miaohe Lin --- mm/hugetlb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 9a72499486c1..6c00ba1dde32 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -4763,7 +4763,7 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src, struct vm_area_struct *dst_vma, struct vm_area_struct *src_vma) { - pte_t *src_pte, *dst_pte, entry, dst_entry; + pte_t *src_pte, *dst_pte, entry; struct page *ptepage; unsigned long addr; bool cow = is_cow_mapping(src_vma->vm_flags); @@ -4823,7 +4823,6 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src, src_ptl = huge_pte_lockptr(h, src, src_pte); spin_lock_nested(src_ptl, SINGLE_DEPTH_NESTING); entry = huge_ptep_get(src_pte); - dst_entry = huge_ptep_get(dst_pte); again: if (huge_pte_none(entry)) { /* @@ -4906,7 +4905,7 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src, restore_reserve_on_error(h, dst_vma, addr, new); put_page(new); - /* dst_entry won't change as in child */ + /* huge_ptep of dst_pte won't change as in child */ goto again; } hugetlb_install_page(dst_vma, dst_pte, addr, new);