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

2025-01-10 Thread Dixit, Ashutosh
On Thu, 09 Jan 2025 05:16:39 -0800, Joel Granados wrote: > > diff --git a/drivers/gpu/drm/i915/i915_perf.c > b/drivers/gpu/drm/i915/i915_perf.c > index 2406cda75b7b..5384d1bb4923 100644 > --- a/drivers/gpu/drm/i915/i915_perf.c > +++ b/drivers/gpu/drm/i915/i915_perf.c > @@ -4802,7 +4802,7 @@ int i9

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

2025-01-09 Thread Song Liu
On Thu, Jan 9, 2025 at 5:16 AM Joel Granados wrote: > [...] > drivers/base/firmware_loader/fallback_table.c | 2 +- > drivers/cdrom/cdrom.c | 2 +- > drivers/char/hpet.c | 2 +- > drivers/char/ipmi/ipmi_poweroff.c | 2 +- > drivers/cha

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

2025-01-09 Thread Darrick J. Wong
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. > > Constifying ctl_table struc

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

2025-01-09 Thread Corey Minyard
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. > ... > diff --git a/drivers/ch

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

2025-01-09 Thread Martin K. Petersen
Joel, > 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. Reviewed-by: Martin K. Petersen # SCSI -- Martin K. Petersen Oracle Linux Eng

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

2025-01-09 Thread Jani Nikula
On Thu, 09 Jan 2025, Joel Granados wrote: > diff --git a/drivers/gpu/drm/i915/i915_perf.c > b/drivers/gpu/drm/i915/i915_perf.c > index 2406cda75b7b..5384d1bb4923 100644 > --- a/drivers/gpu/drm/i915/i915_perf.c > +++ b/drivers/gpu/drm/i915/i915_perf.c > @@ -4802,7 +4802,7 @@ int i915_perf_remove_c

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

2025-01-09 Thread Steven Rostedt
On Thu, 09 Jan 2025 14:16:39 +0100 Joel Granados wrote: > diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c > index 2e113f8b13a2..489cbab3d64c 100644 > --- a/kernel/trace/ftrace.c > +++ b/kernel/trace/ftrace.c > @@ -8786,7 +8786,7 @@ ftrace_enable_sysctl(const struct ctl_table *table, in

[PATCH] treewide: const qualify ctl_tables where applicable

2025-01-09 Thread Joel Granados
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. Constifying ctl_table structs will prevent the modification of proc_handler function pointers as the