Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp1162801pxt; Sat, 7 Aug 2021 02:38:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxevb634HycaTreXRluNwQJvpNmhX5zgnLsta2mjBkyD0VpXxBDDtgGBG+PhYXagTcDBqZb X-Received: by 2002:a92:c149:: with SMTP id b9mr194086ilh.163.1628329132153; Sat, 07 Aug 2021 02:38:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628329132; cv=none; d=google.com; s=arc-20160816; b=STEaXFq/5PGl0KmT/65AHR8jsAh643bqCm6Jftx7UCr90Q0PahPqzj0oP3meWYSGfG 4kilDHcmZWdOUZiyFFcg5UUxyyVn7VF9DgKfDmefUnszLAW3qxRCr9KF1gFYfQZM/VSG /tFJvN4ZRVb8WYrwYIxA+J6iJKla+oTkAOWOvljlQ7uzNfAQQtxs1BE3GfmJBwxG34OU 4PwcFOOuv6FX1eLrFa9Bcx3CrovWcFCISK/aW1p+c0t2Chy5B0Ir0n63OEpDkJir38qd zSj/NlcFwWgyJcjVC0jNErKkwk40qfaUB7wYqiSn19WlDcxYqFtXtphtCD465k1sPagK qlEA== 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=xR42EmDdLn7BSk5Dx/ugwUHqHYhKE5Juk43LgSqKR/g=; b=DlqTtQjn4yumRezAKOBHlqHdZQ42zazDsN4KxoSZbdrG2O6hkdmXwZH2PC87w/NogT P9B7gk+UYmuoo5JFst38imd7zbwLk2OUoSvdD0eOCYHaduEOMbWIeyUXcsj4sIgCNalD t2s+ztikvkc0R228PwGvm2hQYco5ofGc9Ar5RKo4xRIVZmQh0RvsI6nTFo9f6/CQoWSB DZfptVWUmRfsElnLpc9w7eAbapmp8bvbDGPsuluQ/5Z971zy/qXhRS0bqzFEWtaHR2rM uwvLLb5vx4NTVvhAXA4fhDj9nOKC2Zn8BgYZwICDItW2I32wkUrx/tOeBw8B/DdXNuBv RwbA== 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 b24si11084283jar.119.2021.08.07.02.38.39; Sat, 07 Aug 2021 02:38:52 -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 S231758AbhHGJgk (ORCPT + 99 others); Sat, 7 Aug 2021 05:36:40 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:13294 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231613AbhHGJgh (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 4GhcY804dXz7yVn; 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:17 +0800 From: Miaohe Lin To: CC: , , , , , , Subject: [PATCH 1/5] mm: gup: remove set but unused local variable major Date: Sat, 7 Aug 2021 17:36:16 +0800 Message-ID: <20210807093620.21347-2-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 Since commit a2beb5f1efed ("mm: clean up the last pieces of page fault accountings"), the local variable major is unused. Remove it. Signed-off-by: Miaohe Lin --- mm/gup.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/gup.c b/mm/gup.c index 77150624f77a..430495cb1b91 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -1276,7 +1276,7 @@ int fixup_user_fault(struct mm_struct *mm, bool *unlocked) { struct vm_area_struct *vma; - vm_fault_t ret, major = 0; + vm_fault_t ret; address = untagged_addr(address); @@ -1296,7 +1296,6 @@ int fixup_user_fault(struct mm_struct *mm, return -EINTR; ret = handle_mm_fault(vma, address, fault_flags, NULL); - major |= ret & VM_FAULT_MAJOR; if (ret & VM_FAULT_ERROR) { int err = vm_fault_to_errno(ret, 0); -- 2.23.0