Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp1162473pxt; Sat, 7 Aug 2021 02:38:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPzRgXi97boUalGD8VCHcJSxvQySHHtjqcg7Xr5rl5gLpBn9hcDDwbm1b9B2k5aqBBB93d X-Received: by 2002:a92:cb52:: with SMTP id f18mr391751ilq.97.1628329094163; Sat, 07 Aug 2021 02:38:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628329094; cv=none; d=google.com; s=arc-20160816; b=cR1gePRC0AdFp9lOcBGFqxdoHvRsZEaxRNQCkdS1QS+Yv9M1c+0lAD1vYoWhnZT/Id 3HAnbdFdg668R12wzmIEN14AFZiOKOlC29CPWJa7YPf3Hrth9tFpIjEtCKI3vw/DcRgw MtMSDQ0vAsVV8CTKh1gK/w2GwfY9dAIGt4NOGzZGeeZMDEFw6iRAr1RDSiEBztY444lv 8MSo4xM/CYM8TIWG6dzCj+2bfbMcumhC+7pwRAb2pbCUlAPjIUxAn+OUVNNSKqZT3zUx uhVZBf7MEq3PVKKAPasn0yZGX86h5Im0C5v/jCQZ9U5KonYv3YHGT2EGTFvyj/wjKi4h fNaA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=yg7hgs+4Fc3OGDfK8SDTZpXy6zxVFyPdIB9sHxSqJzU=; b=w9N6Qyk23FIv6NRbtO27YieMhHucrZ19XkTgOsAMmHeV+AE67SvaPbCzFuJySuQOaM DYswHHhRIkwiiQ5VO2PK5u+6gYOMSyNidhK5JlvTpzh1VEMV0LBrHcauLMwEgM0LZc09 7xxL+PKtBce59aULfGi9f2/GUhR6NpIQ2f6xSfK4GSplhoy/Inz51eU1WAx3vrnhb/Nu i2QjsS2Koten7uEk4qMeOyQqwEPIQXZ9hcoYW5KTzjlHI98WG6r+GPhwLceBKR7YGiwZ WSfiYC5MxwhSlgQmDvUSszJUheE6jpjZQCXreepxoT/Apws3Nff+eb6I1i9rFajN0nYC ePaw== 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=NONE sp=NONE 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 d7si10568498iop.31.2021.08.07.02.38.03; Sat, 07 Aug 2021 02:38:14 -0700 (PDT) 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=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231772AbhHGJgl (ORCPT + 99 others); Sat, 7 Aug 2021 05:36:41 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:13295 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231627AbhHGJgh (ORCPT ); Sat, 7 Aug 2021 05:36:37 -0400 Received: from dggeme703-chm.china.huawei.com (unknown [172.30.72.56]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4GhcY83Xztz828g; Sat, 7 Aug 2021 17:31:24 +0800 (CST) Received: from huawei.com (10.175.124.27) by dggeme703-chm.china.huawei.com (10.1.199.99) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Sat, 7 Aug 2021 17:36:18 +0800 From: Miaohe Lin To: CC: , , , , , , Subject: [PATCH 2/5] mm: gup: remove unneed local variable orig_refs Date: Sat, 7 Aug 2021 17:36:17 +0800 Message-ID: <20210807093620.21347-3-linmiaohe@huawei.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20210807093620.21347-1-linmiaohe@huawei.com> References: <20210807093620.21347-1-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.27] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggeme703-chm.china.huawei.com (10.1.199.99) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Remove unneed local variable orig_refs since refs is unchanged now. Signed-off-by: Miaohe Lin --- mm/gup.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm/gup.c b/mm/gup.c index 430495cb1b91..d6056dcab02c 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -117,8 +117,6 @@ __maybe_unused struct page *try_grab_compound_head(struct page *page, if (flags & FOLL_GET) return try_get_compound_head(page, refs); else if (flags & FOLL_PIN) { - int orig_refs = refs; - /* * Can't do FOLL_LONGTERM + FOLL_PIN gup fast path if not in a * right zone, so fail and let the caller fall back to the slow @@ -150,7 +148,7 @@ __maybe_unused struct page *try_grab_compound_head(struct page *page, page_ref_add(page, refs * (GUP_PIN_COUNTING_BIAS - 1)); mod_node_page_state(page_pgdat(page), NR_FOLL_PIN_ACQUIRED, - orig_refs); + refs); return page; } -- 2.23.0