0
0
mirror of https://mirrors.bfsu.edu.cn/git/linux.git synced 2024-12-16 23:45:31 +08:00
linux/drivers/pinctrl
Gustavo A. R. Silva fe4f86affd pinctrl: st: constify gpio_chip structure
This structure is only used to copy into other structure, so declare
it as const.

This issue was detected using Coccinelle and the following semantic patch:

@r disable optional_qualifier@
identifier i;
position p;
@@
static struct gpio_chip i@p = { ... };

@ok@
identifier r.i;
expression e;
position p;
@@
e = i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct gpio_chip e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct gpio_chip i = { ... };

In the following log you can see a significant difference in the code size
and data segment, hence in the dec segment. This log is the output
of the size command, before and after the code change:

before:
   text    data     bss     dec     hex filename
  21671    3632     128   25431    6357 drivers/pinctrl/pinctrl-st.o

after:
   text    data     bss     dec     hex filename
  21366    3576     128   25070    61ee drivers/pinctrl/pinctrl-st.o

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Acked-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2017-08-14 15:01:01 +02:00
..
aspeed pinctrl: aspeed: g5: Add pinconf support 2017-04-24 14:55:50 +02:00
bcm pinctrl: bcm2835: Avoid warning from __irq_do_set_handler 2017-06-29 11:04:38 +02:00
berlin Pin control bulk changes for the v4.11 kernel cycle: 2017-02-21 16:34:22 -08:00
freescale pinctrl: pinctrl-imx7ulp: add gpio_set_direction support 2017-08-14 15:01:01 +02:00
intel pinctrl: baytrail: Do not call WARN_ON for a firmware bug 2017-08-14 15:01:01 +02:00
mediatek pinctrl: mediatek: reuse pinctrl driver for mt7623 2017-05-22 10:39:25 +02:00
meson pinctrl: meson-gxl: add tsin_a pins 2017-06-16 11:08:49 +02:00
mvebu pinctrl: armada-37xx: Fix number of pin in south bridge 2017-08-07 13:55:32 +02:00
nomadik pinctrl: nomadik: abx500: constify gpio_chip structure 2017-08-14 15:00:59 +02:00
pxa pinctrl: pxa: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 00:03:04 +02:00
qcom pinctrl: qcom: msm: constify gpio_chip structure 2017-08-14 15:01:00 +02:00
samsung pinctrl: samsung: Remove bogus irq_[un]mask from resource management 2017-06-30 15:51:42 +02:00
sh-pfc pinctrl: sh-pfc: r8a7795: Add PWM support 2017-06-26 10:21:38 +02:00
sirf pinctrl: sirf: atlas7: make use of raw_spinlock variants 2017-03-16 16:39:15 +01:00
spear pinctrl: spear: make bool drivers explicitly non-modular 2017-02-13 14:25:55 +01:00
stm32 pinctrl: stm32: select IRQ_DOMAIN_HIERARCHY instead of depends on 2017-08-01 10:04:41 +02:00
sunxi pinctrl: sunxi: rename R_PIO i2c pin function name 2017-08-14 15:00:59 +02:00
tegra pinctrl: tegra: clean up modular vs. non-modular distinctions 2017-05-29 10:24:42 +02:00
ti pinctrl: core: Fix pinctrl_register_and_init() with pinctrl_enable() 2017-04-07 01:08:08 +02:00
uniphier pinctrl: uniphier: add UniPhier PXs3 pinctrl driver 2017-08-14 15:01:00 +02:00
vt8500 pinctrl: vt8500: wmt: constify gpio_chip structure 2017-08-14 15:00:59 +02:00
zte pinctrl: zte: fix dereference of 'data' in zx_set_mux() 2017-07-31 15:13:09 +02:00
core.c Linux 4.12-rc7 2017-06-29 14:27:39 +02:00
core.h pinctrl: core: Fix regression caused by delayed work for hogs 2017-01-13 16:25:17 +01:00
devicetree.c pinctrl: core: Make dt_free_map optional 2017-01-09 19:41:07 +01:00
devicetree.h pinctrl: core: Use delayed work for hogs 2017-01-03 09:26:16 +01:00
Kconfig pinctrl: sh-pfc: Updates for v4.13 (take two) 2017-06-29 15:05:51 +02:00
Makefile pinctrl: sh-pfc: Updates for v4.13 (take two) 2017-06-29 15:05:51 +02:00
pinconf-generic.c pinctrl: generic: Add output-enable property 2017-06-29 14:30:49 +02:00
pinconf.c pinctrl: Add spaces for better code readability 2017-05-22 10:39:24 +02:00
pinconf.h pinctrl: Allow configuration of pins from gpiolib based drivers 2017-01-26 15:23:01 +01:00
pinctrl-adi2-bf54x.c
pinctrl-adi2-bf60x.c
pinctrl-adi2.c pinctrl: adi2: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:20 +02:00
pinctrl-adi2.h
pinctrl-amd.c Linux 4.12-rc7 2017-06-29 14:27:39 +02:00
pinctrl-amd.h pinctrl: amd: make use of raw_spinlock variants 2017-03-16 16:39:15 +01:00
pinctrl-artpec6.c pinctrl: artpec6: Fix return value check in artpec6_pmx_probe() 2017-04-28 09:40:52 +02:00
pinctrl-as3722.c pinctrl: as3722: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:21 +02:00
pinctrl-at91-pio4.c pinctrl: at91-pio4: handle suspend to ram 2017-04-07 14:32:51 +02:00
pinctrl-at91.c pinctrl: at91: add support for OUTPUT config 2016-10-31 09:16:46 +01:00
pinctrl-at91.h
pinctrl-coh901.c pinctrl: coh901: constify gpio_chip structure 2017-08-14 15:00:59 +02:00
pinctrl-coh901.h
pinctrl-da850-pupd.c Merge branch 'ib-pinctrl-genprops' into devel 2017-01-26 15:27:54 +01:00
pinctrl-digicolor.c Revert "pinctrl: digicolor: add missing platform_set_drvdata() call" 2016-06-23 09:50:05 +02:00
pinctrl-falcon.c pinctrl: update my email address 2016-12-30 09:17:02 +01:00
pinctrl-ingenic.c pinctrl: ingenic: checking for NULL instead of IS_ERR() 2017-06-20 11:36:17 +02:00
pinctrl-lantiq.c pinctrl: update my email address 2016-12-30 09:17:02 +01:00
pinctrl-lantiq.h pinctrl: update my email address 2016-12-30 09:17:02 +01:00
pinctrl-lpc18xx.c pinctrl: Widen the generic pinconf argument from 16 to 24 bits 2017-01-26 15:22:32 +01:00
pinctrl-max77620.c pinctrl: Widen the generic pinconf argument from 16 to 24 bits 2017-01-26 15:22:32 +01:00
pinctrl-mcp23s08.c pinctrl: mcp23s08: drop comment about missing irq support 2017-05-23 09:51:08 +02:00
pinctrl-oxnas.c pinctrl: oxnas: Add support for OX820 2016-10-24 16:30:14 +02:00
pinctrl-palmas.c pinctrl: Widen the generic pinconf argument from 16 to 24 bits 2017-01-26 15:22:32 +01:00
pinctrl-pic32.c pinctrl: pic32: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:24 +02:00
pinctrl-pic32.h pinctrl: pinctrl-pic32: Add PIC32 pin control driver 2016-02-05 23:54:47 +01:00
pinctrl-pistachio.c pinctrl: pistachio: fix mfio pll_lock pinmux 2016-08-22 15:28:35 +02:00
pinctrl-rockchip.c This is the big bulk of pin control changes for the v4.13 series: 2017-07-06 11:38:59 -07:00
pinctrl-rza1.c pinctrl: rza1: constify gpio_chip structure 2017-08-14 15:00:59 +02:00
pinctrl-single.c pinctrl: single: use of_device_get_match_data() to get soc data 2017-05-29 10:18:46 +02:00
pinctrl-st.c pinctrl: st: constify gpio_chip structure 2017-08-14 15:01:01 +02:00
pinctrl-sx150x.c pinctrl / gpio: Introduce .set_config() callback for GPIO chips 2017-01-26 15:27:37 +01:00
pinctrl-tb10x.c pinctrl: tb10x: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:25 +02:00
pinctrl-tz1090-pdc.c pinctrl: tz1090-pdc: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:26 +02:00
pinctrl-tz1090.c pinctrl: tz1090 Use devm_pinctrl_register() for pinctrl registration 2016-04-21 09:23:26 +02:00
pinctrl-u300.c pinctrl: u300: make u300_pmx_registers static 2016-06-13 09:27:43 +02:00
pinctrl-utils.c pinctrl: Rename pinctrl_utils_dt_free_map to pinctrl_utils_free_map 2016-04-01 15:06:36 +02:00
pinctrl-utils.h pinctrl: Rename pinctrl_utils_dt_free_map to pinctrl_utils_free_map 2016-04-01 15:06:36 +02:00
pinctrl-xway.c pinctrl: xway: fix copy/paste error in xrx200_grps 2017-05-29 18:46:42 +02:00
pinctrl-zynq.c pinctrl: zynq: Add a 8 bit wide nand option 2016-11-04 15:19:00 +01:00
pinmux.c pinctrl: core: Fix warning by removing bogus code 2017-05-22 17:36:13 +02:00
pinmux.h pinctrl: core: Add generic pinctrl functions for managing groups 2017-01-03 09:26:18 +01:00