]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mlxsw: spectrum_router: Constify struct devlink_dpipe_table_ops
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 2 Jun 2024 14:18:53 +0000 (16:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 5 Jun 2024 09:24:57 +0000 (10:24 +0100)
commitb072aa7899189127e26b2daf8c38933c994f97d3
treed8d3c13b52c92efe2020385affa0fd444e28429f
parent82dc29b9737edf2d13561ebcf6212c0b88c41129
mlxsw: spectrum_router: Constify struct devlink_dpipe_table_ops

'struct devlink_dpipe_table_ops' are not modified in this driver.

Constifying these structures moves some data to a read-only section, so
increase overall security.

On a x86_64, with allmodconfig:
Before:
======
   text    data     bss     dec     hex filename
  15557     712       0   16269    3f8d drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.o

After:
=====
   text    data     bss     dec     hex filename
  15789     488       0   16277    3f95 drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_dpipe.c