From patchwork Tue Feb 27 19:23:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 13574326 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 5E491C5478C for ; Tue, 27 Feb 2024 19:23:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D52696B00E1; Tue, 27 Feb 2024 14:23:42 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id CD19E6B00E2; Tue, 27 Feb 2024 14:23:42 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B55566B00E3; Tue, 27 Feb 2024 14:23:42 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 9C1CB6B00E1 for ; Tue, 27 Feb 2024 14:23:42 -0500 (EST) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 7DF4680E0C for ; Tue, 27 Feb 2024 19:23:42 +0000 (UTC) X-FDA: 81838558284.24.F964A00 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf26.hostedemail.com (Postfix) with ESMTP id 0E749140010 for ; Tue, 27 Feb 2024 19:23:40 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=thp1A3US; spf=none (imf26.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709061821; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=pXsu/Jnmrwq0LdFzV2fh7keOikBA6k2rhJnBe3lst/o=; b=8Plf08AC++we0fSCTaKGq3HapcBuwznxqZ04nEcfLF1E/3iH6cudv6TPqjSfDq1EH6Tlhm d6XhtjwRImUScEpQVpv1bsPd2DZt6Qzkn/grNyKxzlwOfr8ksX1hjpY5BwiMNFUZToQzdN IYVgVRXO1iyWOL8/k3EEQJ0+Vw+hfKc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709061821; a=rsa-sha256; cv=none; b=vgytq7UKWi+RcJADB00hYo4ZApoRbUY+/ZemgpyaPnEoAR1O9yqcbSbfctFeKt1jfucdhN nCShG2yVHNqkKBVtQdRvf4lmgoVGQnI3GkigkfV+W4SKWT4btS9aVdzWgGU+EYBjfULcro Tp1G5eNRfsn/WZnfWHFm0tlWWYIZ6Zo= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=thp1A3US; spf=none (imf26.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=pXsu/Jnmrwq0LdFzV2fh7keOikBA6k2rhJnBe3lst/o=; b=thp1A3USB5F7BXqpQVn+f/c0ri XqIQP+F/aQpToft06NEsqygc/QYttQMnxgsJUOCAW+EJSgBP7NJp25hDFMluGBTg6p1YPaefv0Lt4 Rlv4OJLybtz4NkbOoo4Gd+17Dqe4r0rPGPPFSXVr18rUCEMlOy2osUxChwcOcOmqkZoayIDYh9Ahi 8U36zf3RE8xMf7pgs4w7eA+NfnZWzZzgfXHSne65K3ZdjpGkIe96hgG9y3ab212yTswycdGPORMrE uXdyUERK5i8E6NnhrsNJKPTmuSgbUzL5XUKAzW1r54l7J2yoE+mSmHplF6nWuV4kCmVl14XKOC3Fd DEszuBLg==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rf33D-00000003B1H-1PtY; Tue, 27 Feb 2024 19:23:39 +0000 From: "Matthew Wilcox (Oracle)" To: Andrew Morton Cc: "Matthew Wilcox (Oracle)" , linux-mm@kvack.org Subject: [PATCH 5/8] mm: Make dump_page() take a const argument Date: Tue, 27 Feb 2024 19:23:32 +0000 Message-ID: <20240227192337.757313-6-willy@infradead.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240227192337.757313-1-willy@infradead.org> References: <20240227192337.757313-1-willy@infradead.org> MIME-Version: 1.0 X-Stat-Signature: zd5a8b5aw4nd7cxqckx3ik3y6pgoxtaz X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 0E749140010 X-Rspam-User: X-HE-Tag: 1709061820-256466 X-HE-Meta: U2FsdGVkX199Ji7D6ZYe1PTDm45oJFeXFFJj3L2S5mEJ49JWg05xzUeZnfgvz8AQImVYfZ+EOntFQTMBkEtYWd4ik1oCQS4gwbOXrW/gGFtXl/JbdDQWKTYOozuqCnPx4oKLzbvv4k9yiu7ByFf2E6Nm/S9nrH0sg/71nwr/Ec++DDXkReIY8be/yyiNMOhkJFIuOTBJzzmyV5YXlb0pVaLT0MDZRFC18hBlk4fbUI6TcS6p8OwPL8DsjeR/8TbNnNLFOEZabX2DzkABu9nzph51VNQATfInYkNyzm9jevUJNZoO1xxpAkhmJJnd2qV/xpHWhfZlF2kgw5zecKOx5LRv1huJe5jNuA/a/MiJAk1t1qO3CYhwdhFHTF3b3q2rgumROgr+JJ3bjK9bB8Zn0OCENA3QpARUns9oNJ3RwqzH+rDeOkpZXZkw9TBSvVWh1yNmcrVQOjPGAiFnfsVWqbxyqXQkivBbSqcj0njL0VfFM/mpSwAm8pHqwMGSpPVH50/NhziJqXgJ/0DUdeau56IX00dP4A10vpYolPYEneEiUlhlS+/6MfZ+F2TyG1/urfxsVi7/IfmVaHCyTlyEjUpLORcasuH024ZoMGx10tMmF8vBIVprtPw/jKlBQMAlXqmOAxxBAQnYZEPHioYwajOXaHbJXLkyD3m8gDCOgZp9ZEkVW3ztGktjJWd/epvVfA/v5zHOlOJIQH1rU548+2NjcZlwewfxxWvvV8vCb5+4reOyW21AZEyLXGQRJvF5Y82D8eHdBPrOu4frMz1S85gbkvI1mKY+xXNJjTe9LtQRJQhX+pehMoHmnpeZSMM8y1SMud++V0Yoia1dzHS+aMnWhL1XPKnkXw4wLpF8EEPTjok8eWEahJAeNQwE+XvJPbJ87xceiZqP3mSPjbksXHM6IILg5GCG 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: List-Subscribe: List-Unsubscribe: Now that __dump_page() takes a const argument, we can make dump_page() take a const struct page too. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: David Hildenbrand --- include/linux/mmdebug.h | 2 +- mm/debug.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/mmdebug.h b/include/linux/mmdebug.h index 7c3e7b0b0e8f..39a7714605a7 100644 --- a/include/linux/mmdebug.h +++ b/include/linux/mmdebug.h @@ -10,7 +10,7 @@ struct vm_area_struct; struct mm_struct; struct vma_iterator; -void dump_page(struct page *page, const char *reason); +void dump_page(const struct page *page, const char *reason); void dump_vma(const struct vm_area_struct *vma); void dump_mm(const struct mm_struct *mm); void vma_iter_dump_tree(const struct vma_iterator *vmi); diff --git a/mm/debug.c b/mm/debug.c index 96555fc78f1a..6149944016a7 100644 --- a/mm/debug.c +++ b/mm/debug.c @@ -143,7 +143,7 @@ static void __dump_page(const struct page *page) __dump_folio(foliop, &precise, pfn, idx); } -void dump_page(struct page *page, const char *reason) +void dump_page(const struct page *page, const char *reason) { if (PagePoisoned(page)) pr_warn("page:%p is uninitialized and poisoned", page);