[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240423-sysctl-const-handler-v3-3-e0beccb836e2@weissschuh.net>
Date: Tue, 23 Apr 2024 09:54:38 +0200
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Luis Chamberlain <mcgrof@...nel.org>,
Joel Granados <j.granados@...sung.com>, Kees Cook <keescook@...omium.org>
Cc: Eric Dumazet <edumazet@...gle.com>, Dave Chinner <david@...morbit.com>,
linux-fsdevel@...r.kernel.org, netdev@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-s390@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-riscv@...ts.infradead.org,
linux-mm@...ck.org, linux-security-module@...r.kernel.org,
bpf@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org,
linux-xfs@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
linux-perf-users@...r.kernel.org, netfilter-devel@...r.kernel.org,
coreteam@...filter.org, kexec@...ts.infradead.org,
linux-hardening@...r.kernel.org, bridge@...ts.linux.dev,
lvs-devel@...r.kernel.org, linux-rdma@...r.kernel.org,
rds-devel@....oracle.com, linux-sctp@...r.kernel.org,
linux-nfs@...r.kernel.org, apparmor@...ts.ubuntu.com,
Thomas Weißschuh <linux@...ssschuh.net>
Subject: [PATCH v3 03/11] hugetlb: constify ctl_table arguments of utility
functions
In a future commit the proc_handlers themselves will change to
"const struct ctl_table". As a preparation for that adapt the internal
helpers.
Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
---
mm/hugetlb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 3b7d5ddc32ad..8d12ce63a439 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -4911,7 +4911,7 @@ static unsigned int allowed_mems_nr(struct hstate *h)
}
#ifdef CONFIG_SYSCTL
-static int proc_hugetlb_doulongvec_minmax(struct ctl_table *table, int write,
+static int proc_hugetlb_doulongvec_minmax(const struct ctl_table *table, int write,
void *buffer, size_t *length,
loff_t *ppos, unsigned long *out)
{
@@ -4928,7 +4928,7 @@ static int proc_hugetlb_doulongvec_minmax(struct ctl_table *table, int write,
}
static int hugetlb_sysctl_handler_common(bool obey_mempolicy,
- struct ctl_table *table, int write,
+ const struct ctl_table *table, int write,
void *buffer, size_t *length, loff_t *ppos)
{
struct hstate *h = &default_hstate;
--
2.44.0
Powered by blists - more mailing lists