aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Granados <j.granados@samsung.com>2024-04-17 10:31:54 +0200
committerJoel Granados <j.granados@samsung.com>2024-04-17 10:31:54 +0200
commita3be65973d27ec2933b9e81e1bec60be3a9b460d (patch)
tree5711cfe37dc06698da5ecb49c3eb3542583f8fb8
parentd1d96ff49b9d6e77c8cd258ffa614d669e2ae193 (diff)
downloadlinux-jag/constfy_treewide_alternative.tar.gz
Bring back const proc_handler function pointerjag/constfy_treewide_alternative
Signed-off-by: Joel Granados <j.granados@samsung.com>
-rw-r--r--fs/proc/proc_sysctl.c2
-rw-r--r--include/linux/sysctl.h3
2 files changed, 2 insertions, 3 deletions
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index fdb741a4a9c484..37cde0efee5707 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -592,7 +592,7 @@ static ssize_t proc_sys_call_handler(struct kiocb *iocb, struct iov_iter *iter,
goto out_free_buf;
/* careful: calling conventions are nasty here */
- error = ((proc_handler*)(table->proc_handler))(table, write, kbuf, &count, &iocb->ki_pos);
+ error = table->proc_handler(table, write, kbuf, &count, &iocb->ki_pos);
if (error)
goto out_free_buf;
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 57e590a138e237..97901dae13485d 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -148,8 +148,7 @@ struct ctl_table {
SYSCTL_TABLE_TYPE_DEFAULT,
SYSCTL_TABLE_TYPE_PERMANENTLY_EMPTY
} type;
- void *proc_handler; /* Callback for text formatting */
- //proc_handler *proc_handler; /* Callback for text formatting */
+ proc_handler *proc_handler; /* Callback for text formatting */
struct ctl_table_poll *poll;
void *extra1;
void *extra2;