Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1503785rdd; Thu, 11 Jan 2024 00:46:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IFKzGPwOueaOwujG+zQMxAXKmUANDovw2YPUstap6FTXrPhqnehHl9bhOeneVnUlPt7otAe X-Received: by 2002:a17:906:3fd1:b0:a28:f816:c4b2 with SMTP id k17-20020a1709063fd100b00a28f816c4b2mr350639ejj.96.1704962778960; Thu, 11 Jan 2024 00:46:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704962778; cv=none; d=google.com; s=arc-20160816; b=J7/xTrNRwcdYXPVgjdEh8fFgYF3JAUFpeJsEeAAXyI/E8/3tFy9VTB0rjz9n44QDjw gEjjxHcqeHRgy3ekVhm4VmjPnXkjer6AAc0fIKmxkIObT+qlVbMWhAsZ4gOp17nBw12Z M6rPcN0VqAOZVN5tLfOIxiuBc4m+ufEM4eRCNo+wtro6yMUA9ryUEBf7hcVZevXrjSex /dVPFUFZyYoyV/xSgYCnqd0sNhCaHgZ+qERbNeU1FxM9qvtOb5T9MQM092yWGRd9ZoWP clPkD0F9kJEYnOvYa7R4B2l1kqzFTui7Y8YB6bi8odnRBoHHyPFS6vaJET0lJ2Mk6vvZ rXDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=2h/4eHJx0IrhQo+9HsTH+o9ebVA9X4AsF8uRdSdCIcY=; fh=R5CrrRphSFz0/69M4ehBfay7IidYrxLqO4Usb8Kb9nM=; b=IsZOkGh3I55eOuhQbVo2efdm8fUuEqhp14ZrfavKo1YRanqRwiv/RID/k56RubfnKh sMEPN0CmdxvW7DwVo19ztWXSMBnjGopKWBeXFJGaVvmJRDJzkF+M8iHrriXukOEvWpCy Gto+xpDEjkY1n0z07XuoHiZ1b+Saw4eMqpUg4I6uHJT6kHVtvFlMGz+g6sVNkITJazko sWstv0lpw/OAjdLVHjyI+sLY4rcPhWb21ztnaMe4K+cHHBWdVatadAkUOR7zHvd0PXez rz873BZCrcASkwpWPoZVnhmmpBeUjv28eYu5q88Q2rzTasuaZygOOvNWCL6EfEztA8uI hwww== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-23239-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23239-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ca9-20020a170906a3c900b00a298de0d4f3si295923ejb.381.2024.01.11.00.46.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 00:46:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23239-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-23239-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23239-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 1B5051F26305 for ; Thu, 11 Jan 2024 08:46:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2F32010A08; Thu, 11 Jan 2024 08:45:53 +0000 (UTC) Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89869101FB; Thu, 11 Jan 2024 08:45:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046050;MF=teawaterz@linux.alibaba.com;NM=1;PH=DS;RN=14;SR=0;TI=SMTPD_---0W-P1z6j_1704962735; Received: from i85c04085.eu95sqa.tbsite.net(mailfrom:teawaterz@linux.alibaba.com fp:SMTPD_---0W-P1z6j_1704962735) by smtp.aliyun-inc.com; Thu, 11 Jan 2024 16:45:43 +0800 From: Hui Zhu To: akpm@linux-foundation.org, david@redhat.com, avagin@google.com, usama.anjum@collabora.com, peterx@redhat.com, hughd@google.com, ryan.roberts@arm.com, wangkefeng.wang@huawei.com, Liam.Howlett@Oracle.com, adobriyan@gmail.com, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: teawater@gmail.com, Hui Zhu Subject: [PATCH] fs/proc/task_mmu.c: add_to_pagemap: Remove useless parameter addr Date: Thu, 11 Jan 2024 08:45:33 +0000 Message-Id: <20240111084533.40038-1-teawaterz@linux.alibaba.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Hui Zhu Function parameters addr of add_to_pagemap is useless. This commit remove it. Signed-off-by: Hui Zhu --- fs/proc/task_mmu.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 62b16f42d5d2..882e2569fc31 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -1352,8 +1352,7 @@ static inline pagemap_entry_t make_pme(u64 frame, u64 flags) return (pagemap_entry_t) { .pme = (frame & PM_PFRAME_MASK) | flags }; } -static int add_to_pagemap(unsigned long addr, pagemap_entry_t *pme, - struct pagemapread *pm) +static int add_to_pagemap(pagemap_entry_t *pme, struct pagemapread *pm) { pm->buffer[pm->pos++] = *pme; if (pm->pos >= pm->len) @@ -1380,7 +1379,7 @@ static int pagemap_pte_hole(unsigned long start, unsigned long end, hole_end = end; for (; addr < hole_end; addr += PAGE_SIZE) { - err = add_to_pagemap(addr, &pme, pm); + err = add_to_pagemap(&pme, pm); if (err) goto out; } @@ -1392,7 +1391,7 @@ static int pagemap_pte_hole(unsigned long start, unsigned long end, if (vma->vm_flags & VM_SOFTDIRTY) pme = make_pme(0, PM_SOFT_DIRTY); for (; addr < min(end, vma->vm_end); addr += PAGE_SIZE) { - err = add_to_pagemap(addr, &pme, pm); + err = add_to_pagemap(&pme, pm); if (err) goto out; } @@ -1519,7 +1518,7 @@ static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end, for (; addr != end; addr += PAGE_SIZE) { pagemap_entry_t pme = make_pme(frame, flags); - err = add_to_pagemap(addr, &pme, pm); + err = add_to_pagemap(&pme, pm); if (err) break; if (pm->show_pfn) { @@ -1547,7 +1546,7 @@ static int pagemap_pmd_range(pmd_t *pmdp, unsigned long addr, unsigned long end, pagemap_entry_t pme; pme = pte_to_pagemap_entry(pm, vma, addr, ptep_get(pte)); - err = add_to_pagemap(addr, &pme, pm); + err = add_to_pagemap(&pme, pm); if (err) break; } @@ -1597,7 +1596,7 @@ static int pagemap_hugetlb_range(pte_t *ptep, unsigned long hmask, for (; addr != end; addr += PAGE_SIZE) { pagemap_entry_t pme = make_pme(frame, flags); - err = add_to_pagemap(addr, &pme, pm); + err = add_to_pagemap(&pme, pm); if (err) return err; if (pm->show_pfn && (flags & PM_PRESENT)) -- 2.19.1.6.gb485710b