can: m_can: Constify struct m_can_ops
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 23 Jun 2024 20:01:50 +0000 (22:01 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 28 Jun 2024 07:35:13 +0000 (09:35 +0200)
commit62d73261a0cfa309fd07d0da41a74b3f47f25b6f
tree656ff9d597e85205e65f679e698d84d6f3396350
parent580d1712a4b0a1242792b1207f7c0679a2de9078
can: m_can: Constify struct m_can_ops

'struct m_can_ops' is not modified in these drivers.

Constifying this structure 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
   4806     520       0    5326    14ce drivers/net/can/m_can/m_can_pci.o

After:
=====
   text    data     bss     dec     hex filename
   4862     464       0    5326    14ce drivers/net/can/m_can/m_can_pci.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/all/a17b96d1be5341c11f263e1e45c9de1cb754e416.1719172843.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/m_can/m_can.h
drivers/net/can/m_can/m_can_pci.c
drivers/net/can/m_can/m_can_platform.c
drivers/net/can/m_can/tcan4x5x-core.c