2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/drivers/char/ipmi
Joel Granados 1751f872cc treewide: const qualify ctl_tables where applicable
Add the const qualifier to all the ctl_tables in the tree except for
watchdog_hardlockup_sysctl, memory_allocation_profiling_sysctls,
loadpin_sysctl_table and the ones calling register_net_sysctl (./net,
drivers/inifiniband dirs). These are special cases as they use a
registration function with a non-const qualified ctl_table argument or
modify the arrays before passing them on to the registration function.

Constifying ctl_table structs will prevent the modification of
proc_handler function pointers as the arrays would reside in .rodata.
This is made possible after commit 78eb4ea25c ("sysctl: treewide:
constify the ctl_table argument of proc_handlers") constified all the
proc_handlers.

Created this by running an spatch followed by a sed command:
Spatch:
    virtual patch

    @
    depends on !(file in "net")
    disable optional_qualifier
    @

    identifier table_name != {
      watchdog_hardlockup_sysctl,
      iwcm_ctl_table,
      ucma_ctl_table,
      memory_allocation_profiling_sysctls,
      loadpin_sysctl_table
    };
    @@

    + const
    struct ctl_table table_name [] = { ... };

sed:
    sed --in-place \
      -e "s/struct ctl_table .table = &uts_kern/const struct ctl_table *table = \&uts_kern/" \
      kernel/utsname_sysctl.c

Reviewed-by: Song Liu <song@kernel.org>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org> # for kernel/trace/
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> # SCSI
Reviewed-by: Darrick J. Wong <djwong@kernel.org> # xfs
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Acked-by: Wei Liu <wei.liu@kernel.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Bill O'Donnell <bodonnel@redhat.com>
Acked-by: Baoquan He <bhe@redhat.com>
Acked-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Acked-by: Anna Schumaker <anna.schumaker@oracle.com>
Signed-off-by: Joel Granados <joel.granados@kernel.org>
2025-01-28 13:48:37 +01:00
..
bt-bmc.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
ipmb_dev_int.c char:ipmi: Fix a not-used variable on a non-ACPI system 2024-12-22 14:57:47 -06:00
ipmi_bt_sm.c ipmi: Clean up some printks 2020-09-15 09:57:45 -05:00
ipmi_devintf.c ipmi: make ipmi_destroy_user() return void 2025-01-02 21:11:52 -06:00
ipmi_dmi.c ipmi_si: Rework some include files 2019-08-02 07:25:03 -05:00
ipmi_dmi.h ipmi_si: Rework some include files 2019-08-02 07:25:03 -05:00
ipmi_ipmb.c ipmi: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-07-08 15:05:18 -05:00
ipmi_kcs_sm.c ipmi: fix msg stack when IPMI is disconnected 2022-10-17 09:51:27 -05:00
ipmi_msghandler.c ipmi: make ipmi_destroy_user() return void 2025-01-02 21:11:52 -06:00
ipmi_plat_data.c ipmi: Handle device properties with software node API 2021-03-10 19:00:02 -06:00
ipmi_plat_data.h ipmi: Add the i2c-addr property for SSIF interfaces 2019-04-24 09:02:53 -05:00
ipmi_powernv.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
ipmi_poweroff.c treewide: const qualify ctl_tables where applicable 2025-01-28 13:48:37 +01:00
ipmi_si_hardcode.c ipmi: Use regspacings passed as a module parameter 2023-12-19 06:32:27 -06:00
ipmi_si_hotmod.c ipmi_si: Join string literals back 2021-04-02 12:53:42 -05:00
ipmi_si_intf.c char: ipmi: handle HAS_IOPORT dependencies 2024-04-17 14:55:04 -05:00
ipmi_si_mem_io.c ipmi_si: Rework some include files 2019-08-02 07:25:03 -05:00
ipmi_si_parisc.c parisc: Make struct parisc_driver::remove() return void 2021-08-30 10:18:25 +02:00
ipmi_si_pci.c char:ipmi: Fix the wrong format specifier 2024-11-06 06:54:46 -06:00
ipmi_si_platform.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
ipmi_si_port_io.c ipmi_si: Rework some include files 2019-08-02 07:25:03 -05:00
ipmi_si_sm.h ipmi_si: Rework some include files 2019-08-02 07:25:03 -05:00
ipmi_si.h parisc: Make struct parisc_driver::remove() return void 2021-08-30 10:18:25 +02:00
ipmi_smic_sm.c ipmi: Clean up some printks 2020-09-15 09:57:45 -05:00
ipmi_ssif.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
ipmi_watchdog.c ipmi: Minor fixes and update my email address 2025-01-22 10:57:57 -08:00
Kconfig ipmi: ASPEED_BT_IPMI_BMC: select REGMAP_MMIO instead of depending on it 2023-03-02 16:14:15 -06:00
kcs_bmc_aspeed.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
kcs_bmc_cdev_ipmi.c ipmi: Add __init/__exit annotations to module init/exit funcs 2022-09-22 10:55:46 -05:00
kcs_bmc_client.h ipmi: kcs_bmc: Allow clients to control KCS IRQ state 2021-06-21 19:50:28 -05:00
kcs_bmc_device.h ipmi: kcs_bmc: Allow clients to control KCS IRQ state 2021-06-21 19:50:28 -05:00
kcs_bmc_npcm7xx.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
kcs_bmc_serio.c ipmi: Add __init/__exit annotations to module init/exit funcs 2022-09-22 10:55:46 -05:00
kcs_bmc.c ipmi: fix potential deadlock on &kcs_bmc->lock 2023-07-04 09:22:45 -05:00
kcs_bmc.h ipmi: kcs_bmc: Allow clients to control KCS IRQ state 2021-06-21 19:50:28 -05:00
Makefile char: ipmi: handle HAS_IOPORT dependencies 2024-04-17 14:55:04 -05:00
ssif_bmc.c ipmi: ssif_bmc: Fix new request loss when bmc ready for a response 2025-01-07 09:14:26 -06:00