1
linux/drivers/pinctrl/meson
Christophe JAILLET 8a74a53ebb pinctrl: meson: Constify some structures
The following structures are not modified in these drivers.
  - struct meson_bank
  - struct meson_pmx_bank
  - struct meson_pmx_func
  - struct meson_pmx_group
  - struct meson_pinctrl_data
  - struct meson_axg_pmx_data

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
  10818	  11696	      0	  22514	   57f2	drivers/pinctrl/meson/pinctrl-amlogic-c3.o
  17198	  17680	      0	  34878	   883e	drivers/pinctrl/meson/pinctrl-amlogic-t7.o
  14161	  11200	      0	  25361	   6311	drivers/pinctrl/meson/pinctrl-meson8b.o
  17348	  12512	      0	  29860	   74a4	drivers/pinctrl/meson/pinctrl-meson8.o
   3070	    324	      0	   3394	    d42	drivers/pinctrl/meson/pinctrl-meson8-pmx.o
   9317	   9648	      0	  18965	   4a15	drivers/pinctrl/meson/pinctrl-meson-a1.o
  12115	  11664	      0	  23779	   5ce3	drivers/pinctrl/meson/pinctrl-meson-axg.o
   2470	    120	      0	   2590	    a1e	drivers/pinctrl/meson/pinctrl-meson-axg-pmx.o
  15125	  15224	      0	  30349	   768d	drivers/pinctrl/meson/pinctrl-meson-g12a.o
  13800	  10160	      0	  23960	   5d98	drivers/pinctrl/meson/pinctrl-meson-gxbb.o
  13040	   9648	      0	  22688	   58a0	drivers/pinctrl/meson/pinctrl-meson-gxl.o
  20507	   1132	     48	  21687	   54b7	drivers/pinctrl/meson/pinctrl-meson.o
  12212	  12880	      0	  25092	   6204	drivers/pinctrl/meson/pinctrl-meson-s4.o

After:
=====
   text	   data	    bss	    dec	    hex	filename
  22242	    248	      0	  22490	   57da	drivers/pinctrl/meson/pinctrl-amlogic-c3.o
  34638	    248	      0	  34886	   8846	drivers/pinctrl/meson/pinctrl-amlogic-t7.o
  25137	    232	      0	  25369	   6319	drivers/pinctrl/meson/pinctrl-meson8b.o
  29604	    232	      0	  29836	   748c	drivers/pinctrl/meson/pinctrl-meson8.o
   3070	    324	      0	   3394	    d42	drivers/pinctrl/meson/pinctrl-meson8-pmx.o
  18725	    248	      0	  18973	   4a1d	drivers/pinctrl/meson/pinctrl-meson-a1.o
  23539	    248	      0	  23787	   5ceb	drivers/pinctrl/meson/pinctrl-meson-axg.o
   2470	    120	      0	   2590	    a1e	drivers/pinctrl/meson/pinctrl-meson-axg-pmx.o
  30101	    256	      0	  30357	   7695	drivers/pinctrl/meson/pinctrl-meson-g12a.o
  23688	    248	      0	  23936	   5d80	drivers/pinctrl/meson/pinctrl-meson-gxbb.o
  22416	    248	      0	  22664	   5888	drivers/pinctrl/meson/pinctrl-meson-gxl.o
  20507	   1132	     48	  21687	   54b7	drivers/pinctrl/meson/pinctrl-meson.o
  24820	    248	      0	  25068	   61ec	drivers/pinctrl/meson/pinctrl-meson-s4.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Jerome Brunet <jbrunet@baylibre.com>
Tested-by: Jerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/f74e326bd7d48003c06219545bad7c2ef1a84bf8.1723053850.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2024-08-23 18:01:42 +02:00
..
Kconfig pinctrl: Add driver support for Amlogic T7 SoCs 2023-09-25 15:49:18 +02:00
Makefile pinctrl: Add driver support for Amlogic T7 SoCs 2023-09-25 15:49:18 +02:00
pinctrl-amlogic-c3.c pinctrl: meson: Constify some structures 2024-08-23 18:01:42 +02:00
pinctrl-amlogic-t7.c pinctrl: meson: Constify some structures 2024-08-23 18:01:42 +02:00
pinctrl-meson8-pmx.c pinctrl: meson: Constify some structures 2024-08-23 18:01:42 +02:00
pinctrl-meson8-pmx.h
pinctrl-meson8.c pinctrl: meson: Constify some structures 2024-08-23 18:01:42 +02:00
pinctrl-meson8b.c pinctrl: meson: Constify some structures 2024-08-23 18:01:42 +02:00
pinctrl-meson-a1.c pinctrl: meson: Constify some structures 2024-08-23 18:01:42 +02:00
pinctrl-meson-axg-pmx.c pinctrl: meson: Constify some structures 2024-08-23 18:01:42 +02:00
pinctrl-meson-axg-pmx.h pinctrl: meson: Constify some structures 2024-08-23 18:01:42 +02:00
pinctrl-meson-axg.c pinctrl: meson: Constify some structures 2024-08-23 18:01:42 +02:00
pinctrl-meson-g12a.c pinctrl: meson: Constify some structures 2024-08-23 18:01:42 +02:00
pinctrl-meson-gxbb.c pinctrl: meson: Constify some structures 2024-08-23 18:01:42 +02:00
pinctrl-meson-gxl.c pinctrl: meson: Constify some structures 2024-08-23 18:01:42 +02:00
pinctrl-meson-s4.c pinctrl: meson: Constify some structures 2024-08-23 18:01:42 +02:00
pinctrl-meson.c pinctrl: meson: Constify some structures 2024-08-23 18:01:42 +02:00
pinctrl-meson.h pinctrl: meson: Constify some structures 2024-08-23 18:01:42 +02:00