Thread (7 messages) 7 messages, 7 authors, 2025-01-10

Re: [PATCH] treewide: const qualify ctl_tables where applicable

From: Corey Minyard <corey@minyard.net>
Date: 2025-01-09 15:45:36
Also in: bpf, dri-devel, intel-gfx, intel-xe, io-uring, kexec, keyrings, linux-arm-kernel, linux-crypto, linux-fsdevel, linux-hardening, linux-hyperv, linux-mm, linux-nfs, linux-raid, linux-rdma, linux-riscv, linux-s390, linux-scsi, linux-security-module, linux-serial, linux-xfs, linuxppc-dev, lkml, netfs, ocfs2-devel, xen-devel

On Thu, Jan 09, 2025 at 02:16:39PM +0100, Joel Granados wrote:
Add the const qualifier to all the ctl_tables in the tree except the
ones in ./net dir. The "net" sysctl code is special as it modifies the
arrays before passing it on to the registration function.
...
quoted hunk ↗ jump to hunk
diff --git a/drivers/char/ipmi/ipmi_poweroff.c b/drivers/char/ipmi/ipmi_poweroff.c
index 941d2dcc8c9d..de84f59468a9 100644
--- a/drivers/char/ipmi/ipmi_poweroff.c
+++ b/drivers/char/ipmi/ipmi_poweroff.c
@@ -650,7 +650,7 @@ static struct ipmi_smi_watcher smi_watcher = {
 #ifdef CONFIG_PROC_FS
 #include <linux/sysctl.h>
 
-static struct ctl_table ipmi_table[] = {
+static const struct ctl_table ipmi_table[] = {
 	{ .procname	= "poweroff_powercycle",
 	  .data		= &poweroff_powercycle,
 	  .maxlen	= sizeof(poweroff_powercycle),
For the IPMI portion:

Acked-by: Corey Minyard <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help