diff mbox series

[03/11] hugetlb: constify ctl_table arguments of utility functions

Message ID 20240315-sysctl-const-handler-v1-3-1322ac7cb03d@weissschuh.net (mailing list archive)
State Handled Elsewhere
Delegated to: Paul Moore
Headers show
Series sysctl: treewide: constify ctl_table argument of sysctl handlers | expand

Commit Message

Thomas Weißschuh March 15, 2024, 8:48 p.m. UTC
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@weissschuh.net>
---
 mm/hugetlb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 23ef240ba48a..b0d89ab98eaa 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -4929,7 +4929,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)
 {
@@ -4946,7 +4946,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;