From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 59AA7C624D7 for ; Thu, 3 Sep 2026 10:46:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=cVItOS3d+HSRZzTz2ZIRSaQZZ8Kvrk+kbPyv2r6g/i0=; b=fclSrvY/DlniAUsput1LwazSdg LpZ5lMV+WQpbRkwmER5UuQV+SSe3ZUxlmOvuswiQW3ZEZRxAKdU2Qbg22IIlRY42GmQEo2ChCkkCy o19I86Jen4eE7Ju3aNbiI1jKK8pOgQgTvoWku6UG3i2THreovDZSFyujIv9WLZ8zUEffhprv0XDQT +FIOEiXzIlZPsL0vViTTsAFx9s/5tUKG45YKAUum8LNb1i1qVXKBq0vUSkWmueTgj0Jzu2uZBAuu6 pivOCTMPAxt/RxisPmEVchRSEnC9Ijjh6hxr0sw+pPYA/LtIUBRfM7DwI5DDGU2wnNchd8DTeRZVL VUUO6ARg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x24xC-0000000H7mP-2xgY; Thu, 03 Sep 2026 10:45:58 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x24xA-0000000H7lP-1m5q; Thu, 03 Sep 2026 10:45:57 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1B2FD1596; Thu, 3 Sep 2026 03:45:51 -0700 (PDT) Received: from [10.164.19.53] (unknown [10.164.19.53]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7B13C3F673; Thu, 3 Sep 2026 03:45:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1788432354; bh=B2EGgiinFjR7PIuJDjwPP8zw52e7kf6hQY7DC+ox1r0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=mmq3evjbS8hafbKWyN6WfvB9UfVySk+qoHqsF1QzrHYtoeRp/5znyDeIxQ0XWmzpM HmppJc+wsmOrkjn5ugj5vuGdbtya+eR9c57C4aB5SNws+Twq1UmKFOoPZzxS2fmElr iaXr3Hj7l3p0cwNUfXzOQlwUrYPQgaUrPZbbaJFc= Message-ID: Date: Thu, 3 Sep 2026 16:15:42 +0530 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 3/6] mm/vmalloc: constify vm parameter of get_vm_area_page_order() To: "Mike Rapoport (Microsoft)" , Andrew Morton Cc: =?UTF-8?Q?Adrian_Barna=C5=9B?= , Albert Ou , Alexander Gordeev , Alexandre Ghiti , Andy Lutomirski , Borislav Petkov , Brendan Jackman , Catalin Marinas , Christian Borntraeger , Dave Hansen , David Hildenbrand , Gerald Schaefer , Heiko Carstens , Huacai Chen , Ingo Molnar , Len Brown , Palmer Dabbelt , Paul Walmsley , Pavel Machek , Peter Zijlstra , "H. Peter Anvin" , "Rafael J. Wysocki" , Ryan Roberts , Sven Schnelle , Thomas Gleixner , Uladzislau Rezki , Vasily Gorbik , WANG Xuerui , Will Deacon , x86@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-pm@vger.kernel.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, loongarch@lists.linux.dev References: <20260903-execmem-set-vm-perms-v0-2-v3-0-949b64a9f755@kernel.org> <20260903-execmem-set-vm-perms-v0-2-v3-3-949b64a9f755@kernel.org> Content-Language: en-US From: Dev Jain In-Reply-To: <20260903-execmem-set-vm-perms-v0-2-v3-3-949b64a9f755@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260903_034556_537828_2F5BD943 X-CRM114-Status: GOOD ( 15.48 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 03/09/26 2:58 pm, Mike Rapoport (Microsoft) wrote: > get_vm_area_page_order() and vm_area_page_order() do not need to modify > struct vm_struct passed to them. > > Constify the parameter. > > Reviewed-by: Uladzislau Rezki (Sony) > Signed-off-by: Mike Rapoport (Microsoft) > --- Reviewed-by: Dev Jain > mm/vmalloc.c | 4 ++-- > mm/vmalloc.h | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/mm/vmalloc.c b/mm/vmalloc.c > index 22aa554d123f5..5506b180f5c27 100644 > --- a/mm/vmalloc.c > +++ b/mm/vmalloc.c > @@ -3130,7 +3130,7 @@ EXPORT_SYMBOL(vm_map_ram); > > static struct vm_struct *vmlist __initdata; > > -static inline unsigned int vm_area_page_order(struct vm_struct *vm) > +static inline unsigned int vm_area_page_order(const struct vm_struct *vm) > { > #ifdef CONFIG_HAVE_ARCH_HUGE_VMALLOC > return vm->page_order; > @@ -3139,7 +3139,7 @@ static inline unsigned int vm_area_page_order(struct vm_struct *vm) > #endif > } > > -unsigned int get_vm_area_page_order(struct vm_struct *vm) > +unsigned int get_vm_area_page_order(const struct vm_struct *vm) > { > return vm_area_page_order(vm); > } > diff --git a/mm/vmalloc.h b/mm/vmalloc.h > index 8866ddcff6681..211869f365095 100644 > --- a/mm/vmalloc.h > +++ b/mm/vmalloc.h > @@ -12,7 +12,7 @@ void __init vmalloc_init(void); > int __must_check vmap_pages_range_noflush(unsigned long addr, unsigned long end, > pgprot_t prot, struct page **pages, > unsigned int page_shift, gfp_t gfp_mask); > -unsigned int get_vm_area_page_order(struct vm_struct *vm); > +unsigned int get_vm_area_page_order(const struct vm_struct *vm); > #else > static inline void vmalloc_init(void) {} > >