From patchwork Thu Sep 2 21:53:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12472771 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1819C433F5 for ; Thu, 2 Sep 2021 21:53:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7723B610A2 for ; Thu, 2 Sep 2021 21:53:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 7723B610A2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 19C876B00AD; Thu, 2 Sep 2021 17:53:39 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 14CE06B00AE; Thu, 2 Sep 2021 17:53:39 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 03B9F8D0001; Thu, 2 Sep 2021 17:53:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0127.hostedemail.com [216.40.44.127]) by kanga.kvack.org (Postfix) with ESMTP id E83BC6B00AD for ; Thu, 2 Sep 2021 17:53:38 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id E6CEF2C6AF for ; Thu, 2 Sep 2021 21:53:37 +0000 (UTC) X-FDA: 78543985674.29.4FEC0C8 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf16.hostedemail.com (Postfix) with ESMTP id 9EA37F00008F for ; Thu, 2 Sep 2021 21:53:37 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 8B19461102; Thu, 2 Sep 2021 21:53:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1630619616; bh=Zrfe9BEnUtfD1tCYm4+VMWdmRe29NQe6uCc8RaC4wDw=; h=Date:From:To:Subject:In-Reply-To:From; b=bsKSnL9w3sv3lRJFVgNWYFp9BkYJM8XgMSpjaCJW4RS4Bzy38OuQruFeX1Vt+oQ0M q40zEEoWx74NuKfgcMA38J32HSEjEFB+YTEEAhvERZ3HiuqQa4fwKLmEBAD1QU322z hUWMhcEN9W8rHDjJazX13TQGpJk/J1LjcXNScmTw= Date: Thu, 02 Sep 2021 14:53:36 -0700 From: Andrew Morton To: akpm@linux-foundation.org, david@redhat.com, imbrenda@linux.ibm.com, jack@suse.cz, jhubbard@nvidia.com, kirill.shutemov@linux.intel.com, linmiaohe@huawei.com, linux-mm@kvack.org, mm-commits@vger.kernel.org, torvalds@linux-foundation.org Subject: [patch 069/212] mm: gup: remove unneed local variable orig_refs Message-ID: <20210902215336.jqMySlPeg%akpm@linux-foundation.org> In-Reply-To: <20210902144820.78957dff93d7bea620d55a89@linux-foundation.org> User-Agent: s-nail v14.8.16 Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=bsKSnL9w; spf=pass (imf16.hostedemail.com: domain of akpm@linux-foundation.org designates 198.145.29.99 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 9EA37F00008F X-Stat-Signature: w8s3nskwk7f4za3qu1at3bx5rn1wnx7s X-HE-Tag: 1630619617-499525 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: From: Miaohe Lin Subject: mm: gup: remove unneed local variable orig_refs Remove unneed local variable orig_refs since refs is unchanged now. Link: https://lkml.kernel.org/r/20210807093620.21347-3-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: John Hubbard Reviewed-by: Claudio Imbrenda Reviewed-by: David Hildenbrand Cc: Jan Kara Cc: Kirill A. Shutemov Signed-off-by: Andrew Morton --- mm/gup.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/mm/gup.c~mm-gup-remove-unneed-local-variable-orig_refs +++ a/mm/gup.c @@ -117,8 +117,6 @@ __maybe_unused struct page *try_grab_com 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_com 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; }