[PATCH v2 07/12] parisc/sys_parisc.c: add `const` to mmap_upper_limit() parameter

Max Kellermann posted 12 patches 1 month ago
There is a newer version of this series
[PATCH v2 07/12] parisc/sys_parisc.c: add `const` to mmap_upper_limit() parameter
Posted by Max Kellermann 1 month ago
For improved const-correctness.  This piece is necessary to make the
`rlim_stack` parameter to mmap_base() const.

Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Reviewed-by: Vishal Moola (Oracle) <vishal.moola@gmail.com>
---
 arch/parisc/include/asm/processor.h | 2 +-
 arch/parisc/kernel/sys_parisc.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/parisc/include/asm/processor.h b/arch/parisc/include/asm/processor.h
index 4c14bde39aac..dd0b5e199559 100644
--- a/arch/parisc/include/asm/processor.h
+++ b/arch/parisc/include/asm/processor.h
@@ -48,7 +48,7 @@
 #ifndef __ASSEMBLER__
 
 struct rlimit;
-unsigned long mmap_upper_limit(struct rlimit *rlim_stack);
+unsigned long mmap_upper_limit(const struct rlimit *rlim_stack);
 unsigned long calc_max_stack_size(unsigned long stack_max);
 
 /*
diff --git a/arch/parisc/kernel/sys_parisc.c b/arch/parisc/kernel/sys_parisc.c
index f852fe274abe..c2bbaef7e6b7 100644
--- a/arch/parisc/kernel/sys_parisc.c
+++ b/arch/parisc/kernel/sys_parisc.c
@@ -77,7 +77,7 @@ unsigned long calc_max_stack_size(unsigned long stack_max)
  * indicating that "current" should be used instead of a passed-in
  * value from the exec bprm as done with arch_pick_mmap_layout().
  */
-unsigned long mmap_upper_limit(struct rlimit *rlim_stack)
+unsigned long mmap_upper_limit(const struct rlimit *const rlim_stack)
 {
 	unsigned long stack_base;
 
-- 
2.47.2
Re: [PATCH v2 07/12] parisc/sys_parisc.c: add `const` to mmap_upper_limit() parameter
Posted by Matthew Wilcox 1 month ago
On Sun, Aug 31, 2025 at 11:39:13AM +0200, Max Kellermann wrote:
> For improved const-correctness.  This piece is necessary to make the
> `rlim_stack` parameter to mmap_base() const.

Since you're going to respin this series anyway, your tags are a
disaster.  Tags are not filenames.  They're just to indicate to people
that they should pay attention because it touches their area of
interest.  So this one should just be labelled "parisc:", not
"parisc/sys_parisc.c:"
Re: [PATCH v2 07/12] parisc/sys_parisc.c: add `const` to mmap_upper_limit() parameter
Posted by Max Kellermann 1 month ago
On Mon, Sep 1, 2025 at 2:38 AM Matthew Wilcox <willy@infradead.org> wrote:
> Since you're going to respin this series anyway, your tags are a
> disaster.  Tags are not filenames.  They're just to indicate to people
> that they should pay attention because it touches their area of
> interest.  So this one should just be labelled "parisc:", not
> "parisc/sys_parisc.c:"

OK, "parisc:" is understood - but what tag shall I use for all the
other patches? They're all subsystem "mm". Are they supposed to all
have the same subject? My initial post had that - it was one single
patch that touched the "mm" subsystem".

(Also I'd appreciate a wording less strong than calling an aspect of
my work "a disaster". This is mostly just taste;
submitting-patches.rst is unspecific enough. And quite a few commits
contradict with your interpretation like 620943d7ee69
("include/linux/mmzone.h: clean up watermark accessors").)