]> www.infradead.org Git - users/jedix/linux-maple.git/commit
usb: musb: Constify struct musb_fifo_cfg
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 18 Jan 2025 21:10:17 +0000 (22:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 3 Feb 2025 15:29:53 +0000 (16:29 +0100)
commit51333bfbf18f730a78bbb85895f9c9e4c994d883
tree28844b0061329ee7e5225051d8fd60c4f883f5ba
parent42bc7faaf3a0da2adff71e292efe3eb428018c07
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>
Documentation/driver-api/usb/writing_musb_glue_layer.rst
drivers/usb/musb/jz4740.c
drivers/usb/musb/mediatek.c
drivers/usb/musb/mpfs.c
drivers/usb/musb/musb_core.c
drivers/usb/musb/sunxi.c
include/linux/usb/musb.h