diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2025-01-18 22:10:17 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-02-03 16:29:53 +0100 |
commit | 51333bfbf18f730a78bbb85895f9c9e4c994d883 (patch) | |
tree | 28844b0061329ee7e5225051d8fd60c4f883f5ba /include/linux/usb/musb.h | |
parent | 42bc7faaf3a0da2adff71e292efe3eb428018c07 (diff) |
usb: musb: Constify struct musb_fifo_cfg
'struct musb_fifo_cfg' are not modified in these drivers.
Constifying these structures moves some data to a read-only section, so
increase overall security.
On a x86_64, with allmodconfig, as an example:
Before:
======
text data bss dec hex filename
64381 5537 202 70120 111e8 drivers/usb/musb/musb_core.o
After:
=====
text data bss dec hex filename
64957 4929 202 70088 111c8 drivers/usb/musb/musb_core.o
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/26e6f3e25dc8e785d0034dd7e59918e455563e60.1737234596.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb/musb.h')
-rw-r--r-- | include/linux/usb/musb.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/usb/musb.h b/include/linux/usb/musb.h index 3963e55e88a3..fbdef950f06c 100644 --- a/include/linux/usb/musb.h +++ b/include/linux/usb/musb.h @@ -61,7 +61,7 @@ struct musb_hdrc_eps_bits { }; struct musb_hdrc_config { - struct musb_fifo_cfg *fifo_cfg; /* board fifo configuration */ + const struct musb_fifo_cfg *fifo_cfg; /* board fifo configuration */ unsigned fifo_cfg_size; /* size of the fifo configuration */ /* MUSB configuration-specific details */ |