linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
@ 2017-08-10 10:06 Julia Lawall
  2017-08-10 10:06 ` [PATCH 01/17] pinctrl: bcm281xx: " Julia Lawall
                   ` (17 more replies)
  0 siblings, 18 replies; 22+ messages in thread
From: Julia Lawall @ 2017-08-10 10:06 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: bhumirks, kernel-janitors, linux-kernel, linux-gpio,
	Linus Walleij, linux-arm-kernel

These structures are only stored in fields of a pinctrl_desc
structure that are const. Make the structures const as well.

Done with the help of Coccinelle.

---

 drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c  |    4 ++--
 drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c  |    6 +++---
 drivers/pinctrl/bcm/pinctrl-bcm281xx.c      |    2 +-
 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c |    2 +-
 drivers/pinctrl/pinctrl-adi2.c              |    4 ++--
 drivers/pinctrl/pinctrl-artpec6.c           |    2 +-
 drivers/pinctrl/pinctrl-digicolor.c         |    4 ++--
 drivers/pinctrl/pinctrl-ingenic.c           |    6 +++---
 drivers/pinctrl/pinctrl-rza1.c              |    2 +-
 drivers/pinctrl/pinctrl-st.c                |    6 +++---
 drivers/pinctrl/pinctrl-tb10x.c             |    4 ++--
 drivers/pinctrl/pinctrl-tz1090-pdc.c        |    6 +++---
 drivers/pinctrl/pinctrl-tz1090.c            |    6 +++---
 drivers/pinctrl/sirf/pinctrl-atlas7.c       |    2 +-
 drivers/pinctrl/sirf/pinctrl-sirf.c         |    4 ++--
 drivers/pinctrl/ti/pinctrl-ti-iodelay.c     |    4 ++--
 drivers/pinctrl/vt8500/pinctrl-wmt.c        |    6 +++---
 17 files changed, 35 insertions(+), 35 deletions(-)

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH 01/17] pinctrl: bcm281xx: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
  2017-08-10 10:06 [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall
@ 2017-08-10 10:06 ` Julia Lawall
  2017-08-10 10:06 ` [PATCH 02/17] pinctrl: artpec6: " Julia Lawall
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Julia Lawall @ 2017-08-10 10:06 UTC (permalink / raw)
  To: Linus Walleij
  Cc: bhumirks, kernel-janitors, Florian Fainelli, Ray Jui,
	Scott Branden, bcm-kernel-feedback-list, linux-gpio,
	linux-kernel

This pinconf_ops structure is only stored in the const confops
field of a pinctrl_desc structure. Make the pinconf_ops structure
const as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/pinctrl/bcm/pinctrl-bcm281xx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/bcm/pinctrl-bcm281xx.c b/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
index a7cceff..bc3b232 100644
--- a/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
+++ b/drivers/pinctrl/bcm/pinctrl-bcm281xx.c
@@ -1384,7 +1384,7 @@ static int bcm281xx_pinctrl_pin_config_set(struct pinctrl_dev *pctldev,
 	return 0;
 }
 
-static struct pinconf_ops bcm281xx_pinctrl_pinconf_ops = {
+static const struct pinconf_ops bcm281xx_pinctrl_pinconf_ops = {
 	.pin_config_get = bcm281xx_pinctrl_pin_config_get,
 	.pin_config_set = bcm281xx_pinctrl_pin_config_set,
 };

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 02/17] pinctrl: artpec6: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
  2017-08-10 10:06 [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall
  2017-08-10 10:06 ` [PATCH 01/17] pinctrl: bcm281xx: " Julia Lawall
@ 2017-08-10 10:06 ` Julia Lawall
  2017-08-10 12:31   ` Lars Persson
  2017-08-10 10:06 ` [PATCH 03/17] pinctrl: armada-37xx: " Julia Lawall
                   ` (15 subsequent siblings)
  17 siblings, 1 reply; 22+ messages in thread
From: Julia Lawall @ 2017-08-10 10:06 UTC (permalink / raw)
  To: Jesper Nilsson
  Cc: bhumirks, kernel-janitors, Lars Persson, Niklas Cassel,
	Linus Walleij, linux-arm-kernel, linux-gpio, linux-kernel

This pinctrl_ops structure is only stored in the const pctlops
field of a pinctrl_desc structure. Make the pinctrl_ops structure
const as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/pinctrl/pinctrl-artpec6.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-artpec6.c b/drivers/pinctrl/pinctrl-artpec6.c
index 357516d..e33781c 100644
--- a/drivers/pinctrl/pinctrl-artpec6.c
+++ b/drivers/pinctrl/pinctrl-artpec6.c
@@ -445,7 +445,7 @@ static unsigned int artpec6_pconf_drive_field_to_mA(int field)
 	}
 }
 
-static struct pinctrl_ops artpec6_pctrl_ops = {
+static const struct pinctrl_ops artpec6_pctrl_ops = {
 	.get_group_pins		= artpec6_get_group_pins,
 	.get_groups_count	= artpec6_get_groups_count,
 	.get_group_name		= artpec6_get_group_name,

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 03/17] pinctrl: armada-37xx: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
  2017-08-10 10:06 [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall
  2017-08-10 10:06 ` [PATCH 01/17] pinctrl: bcm281xx: " Julia Lawall
  2017-08-10 10:06 ` [PATCH 02/17] pinctrl: artpec6: " Julia Lawall
@ 2017-08-10 10:06 ` Julia Lawall
  2017-08-10 10:06 ` [PATCH 04/17] pinctrl: st: " Julia Lawall
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Julia Lawall @ 2017-08-10 10:06 UTC (permalink / raw)
  To: Jason Cooper
  Cc: bhumirks, kernel-janitors, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Linus Walleij, linux-arm-kernel,
	linux-gpio, linux-kernel

This pinconf_ops structure is only stored in the const pinconf_ops
field of a pinctrl_desc structure. Make the pinconf_ops structure
const as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/pinctrl/mvebu/pinctrl-armada-37xx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
index f024e25..997ff05 100644
--- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
+++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c
@@ -243,7 +243,7 @@ static int armada_37xx_pin_config_group_set(struct pinctrl_dev *pctldev,
 	return -ENOTSUPP;
 }
 
-static struct pinconf_ops armada_37xx_pinconf_ops = {
+static const struct pinconf_ops armada_37xx_pinconf_ops = {
 	.is_generic = true,
 	.pin_config_group_get = armada_37xx_pin_config_group_get,
 	.pin_config_group_set = armada_37xx_pin_config_group_set,

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 04/17] pinctrl: st: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
  2017-08-10 10:06 [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall
                   ` (2 preceding siblings ...)
  2017-08-10 10:06 ` [PATCH 03/17] pinctrl: armada-37xx: " Julia Lawall
@ 2017-08-10 10:06 ` Julia Lawall
  2017-08-10 11:03   ` Patrice CHOTARD
  2017-08-10 10:06 ` [PATCH 05/17] pinctrl: sirf: atlas7: " Julia Lawall
                   ` (13 subsequent siblings)
  17 siblings, 1 reply; 22+ messages in thread
From: Julia Lawall @ 2017-08-10 10:06 UTC (permalink / raw)
  To: Patrice Chotard
  Cc: bhumirks, kernel-janitors, Linus Walleij, linux-arm-kernel,
	linux-gpio, linux-kernel

These structures are only stored in fields of a pinctrl_desc
structure (confops, pctlops, and pmxops) that are const. Make the
structures const as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/pinctrl/pinctrl-st.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
index 7ac8b1e..aed8006 100644
--- a/drivers/pinctrl/pinctrl-st.c
+++ b/drivers/pinctrl/pinctrl-st.c
@@ -861,7 +861,7 @@ static void st_pctl_dt_free_map(struct pinctrl_dev *pctldev,
 {
 }
 
-static struct pinctrl_ops st_pctlops = {
+static const struct pinctrl_ops st_pctlops = {
 	.get_groups_count	= st_pctl_get_groups_count,
 	.get_group_pins		= st_pctl_get_group_pins,
 	.get_group_name		= st_pctl_get_group_name,
@@ -928,7 +928,7 @@ static int st_pmx_set_gpio_direction(struct pinctrl_dev *pctldev,
 	return 0;
 }
 
-static struct pinmux_ops st_pmxops = {
+static const struct pinmux_ops st_pmxops = {
 	.get_functions_count	= st_pmx_get_funcs_count,
 	.get_function_name	= st_pmx_get_fname,
 	.get_function_groups	= st_pmx_get_groups,
@@ -1025,7 +1025,7 @@ static void st_pinconf_dbg_show(struct pinctrl_dev *pctldev,
 		ST_PINCONF_UNPACK_RT_DELAY(config));
 }
 
-static struct pinconf_ops st_confops = {
+static const struct pinconf_ops st_confops = {
 	.pin_config_get		= st_pinconf_get,
 	.pin_config_set		= st_pinconf_set,
 	.pin_config_dbg_show	= st_pinconf_dbg_show,

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 05/17] pinctrl: sirf: atlas7: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
  2017-08-10 10:06 [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall
                   ` (3 preceding siblings ...)
  2017-08-10 10:06 ` [PATCH 04/17] pinctrl: st: " Julia Lawall
@ 2017-08-10 10:06 ` Julia Lawall
  2017-08-10 10:06 ` [PATCH 06/17] pinctrl: sirf: " Julia Lawall
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Julia Lawall @ 2017-08-10 10:06 UTC (permalink / raw)
  To: Linus Walleij
  Cc: bhumirks, kernel-janitors, Barry Song, linux-gpio,
	linux-arm-kernel, linux-kernel

This pinmux_ops structure is only stored in the const pmxops field
of a pinctrl_desc structure. Make the pinmux_ops structure const as
well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/pinctrl/sirf/pinctrl-atlas7.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/sirf/pinctrl-atlas7.c b/drivers/pinctrl/sirf/pinctrl-atlas7.c
index d1ef82c..17c326c 100644
--- a/drivers/pinctrl/sirf/pinctrl-atlas7.c
+++ b/drivers/pinctrl/sirf/pinctrl-atlas7.c
@@ -5261,7 +5261,7 @@ static int atlas7_pmx_gpio_request_enable(struct pinctrl_dev *pctldev,
 	return 0;
 }
 
-static struct pinmux_ops atlas7_pinmux_ops = {
+static const struct pinmux_ops atlas7_pinmux_ops = {
 	.get_functions_count = atlas7_pmx_get_funcs_count,
 	.get_function_name = atlas7_pmx_get_func_name,
 	.get_function_groups = atlas7_pmx_get_func_groups,

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 06/17] pinctrl: sirf: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
  2017-08-10 10:06 [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall
                   ` (4 preceding siblings ...)
  2017-08-10 10:06 ` [PATCH 05/17] pinctrl: sirf: atlas7: " Julia Lawall
@ 2017-08-10 10:06 ` Julia Lawall
  2017-08-10 10:06 ` [PATCH 07/17] pinctrl: digicolor: " Julia Lawall
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Julia Lawall @ 2017-08-10 10:06 UTC (permalink / raw)
  To: Linus Walleij
  Cc: bhumirks, kernel-janitors, Barry Song, linux-gpio,
	linux-arm-kernel, linux-kernel

These structures are only stored in fields of a pinctrl_desc
structure (pctlops and pmxops) that are const. Make the
structures const as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/pinctrl/sirf/pinctrl-sirf.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/sirf/pinctrl-sirf.c b/drivers/pinctrl/sirf/pinctrl-sirf.c
index 80bfd47..d3ef059 100644
--- a/drivers/pinctrl/sirf/pinctrl-sirf.c
+++ b/drivers/pinctrl/sirf/pinctrl-sirf.c
@@ -133,7 +133,7 @@ static void sirfsoc_dt_free_map(struct pinctrl_dev *pctldev,
 	kfree(map);
 }
 
-static struct pinctrl_ops sirfsoc_pctrl_ops = {
+static const struct pinctrl_ops sirfsoc_pctrl_ops = {
 	.get_groups_count = sirfsoc_get_groups_count,
 	.get_group_name = sirfsoc_get_group_name,
 	.get_group_pins = sirfsoc_get_group_pins,
@@ -229,7 +229,7 @@ static int sirfsoc_pinmux_request_gpio(struct pinctrl_dev *pmxdev,
 	return 0;
 }
 
-static struct pinmux_ops sirfsoc_pinmux_ops = {
+static const struct pinmux_ops sirfsoc_pinmux_ops = {
 	.set_mux = sirfsoc_pinmux_set_mux,
 	.get_functions_count = sirfsoc_pinmux_get_funcs_count,
 	.get_function_name = sirfsoc_pinmux_get_func_name,

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 07/17] pinctrl: digicolor: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
  2017-08-10 10:06 [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall
                   ` (5 preceding siblings ...)
  2017-08-10 10:06 ` [PATCH 06/17] pinctrl: sirf: " Julia Lawall
@ 2017-08-10 10:06 ` Julia Lawall
  2017-08-10 12:39   ` Baruch Siach
  2017-08-10 10:06 ` [PATCH 08/17] pinctrl: aspeed: g4: " Julia Lawall
                   ` (10 subsequent siblings)
  17 siblings, 1 reply; 22+ messages in thread
From: Julia Lawall @ 2017-08-10 10:06 UTC (permalink / raw)
  To: Linus Walleij
  Cc: bhumirks, kernel-janitors, Baruch Siach, linux-gpio,
	linux-arm-kernel, linux-kernel

These structures are only stored in fields of a pinctrl_desc
structure (pctlops and pmxops) that are const. Make the
structures const as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/pinctrl/pinctrl-digicolor.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-digicolor.c b/drivers/pinctrl/pinctrl-digicolor.c
index 639a57e..ce269ce 100644
--- a/drivers/pinctrl/pinctrl-digicolor.c
+++ b/drivers/pinctrl/pinctrl-digicolor.c
@@ -79,7 +79,7 @@ static int dc_get_group_pins(struct pinctrl_dev *pctldev, unsigned selector,
 	return 0;
 }
 
-static struct pinctrl_ops dc_pinctrl_ops = {
+static const struct pinctrl_ops dc_pinctrl_ops = {
 	.get_groups_count	= dc_get_groups_count,
 	.get_group_name		= dc_get_group_name,
 	.get_group_pins		= dc_get_group_pins,
@@ -161,7 +161,7 @@ static int dc_pmx_request_gpio(struct pinctrl_dev *pcdev,
 	return 0;
 }
 
-static struct pinmux_ops dc_pmxops = {
+static const struct pinmux_ops dc_pmxops = {
 	.get_functions_count	= dc_get_functions_count,
 	.get_function_name	= dc_get_fname,
 	.get_function_groups	= dc_get_groups,

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 08/17] pinctrl: aspeed: g4: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
  2017-08-10 10:06 [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall
                   ` (6 preceding siblings ...)
  2017-08-10 10:06 ` [PATCH 07/17] pinctrl: digicolor: " Julia Lawall
@ 2017-08-10 10:06 ` Julia Lawall
  2017-08-10 10:06 ` [PATCH 09/17] pinctrl: aspeed: g5: " Julia Lawall
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Julia Lawall @ 2017-08-10 10:06 UTC (permalink / raw)
  To: Linus Walleij; +Cc: bhumirks, kernel-janitors, linux-gpio, linux-kernel

These structures are only stored in fields of a pinctrl_desc
structure (pctlops, and pmxops) that are const. Make the
structures const as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c b/drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c
index df56e58..05b1530 100644
--- a/drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c
+++ b/drivers/pinctrl/aspeed/pinctrl-aspeed-g4.c
@@ -2401,7 +2401,7 @@
 	.nconfigs = ARRAY_SIZE(aspeed_g4_configs),
 };
 
-static struct pinmux_ops aspeed_g4_pinmux_ops = {
+static const struct pinmux_ops aspeed_g4_pinmux_ops = {
 	.get_functions_count = aspeed_pinmux_get_fn_count,
 	.get_function_name = aspeed_pinmux_get_fn_name,
 	.get_function_groups = aspeed_pinmux_get_fn_groups,
@@ -2410,7 +2410,7 @@
 	.strict = true,
 };
 
-static struct pinctrl_ops aspeed_g4_pinctrl_ops = {
+static const struct pinctrl_ops aspeed_g4_pinctrl_ops = {
 	.get_groups_count = aspeed_pinctrl_get_groups_count,
 	.get_group_name = aspeed_pinctrl_get_group_name,
 	.get_group_pins = aspeed_pinctrl_get_group_pins,

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 09/17] pinctrl: aspeed: g5: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
  2017-08-10 10:06 [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall
                   ` (7 preceding siblings ...)
  2017-08-10 10:06 ` [PATCH 08/17] pinctrl: aspeed: g4: " Julia Lawall
@ 2017-08-10 10:06 ` Julia Lawall
  2017-08-10 10:06 ` [PATCH 10/17] pinctrl: adi2: " Julia Lawall
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Julia Lawall @ 2017-08-10 10:06 UTC (permalink / raw)
  To: Linus Walleij; +Cc: bhumirks, kernel-janitors, linux-gpio, linux-kernel

These structures are only stored in fields of a pinctrl_desc
structure (confops, pctlops, and pmxops) that are const. Make the
structures const as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c b/drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c
index 634b371..187abd7 100644
--- a/drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c
+++ b/drivers/pinctrl/aspeed/pinctrl-aspeed-g5.c
@@ -2492,7 +2492,7 @@
 	.nconfigs = ARRAY_SIZE(aspeed_g5_configs),
 };
 
-static struct pinmux_ops aspeed_g5_pinmux_ops = {
+static const struct pinmux_ops aspeed_g5_pinmux_ops = {
 	.get_functions_count = aspeed_pinmux_get_fn_count,
 	.get_function_name = aspeed_pinmux_get_fn_name,
 	.get_function_groups = aspeed_pinmux_get_fn_groups,
@@ -2501,7 +2501,7 @@
 	.strict = true,
 };
 
-static struct pinctrl_ops aspeed_g5_pinctrl_ops = {
+static const struct pinctrl_ops aspeed_g5_pinctrl_ops = {
 	.get_groups_count = aspeed_pinctrl_get_groups_count,
 	.get_group_name = aspeed_pinctrl_get_group_name,
 	.get_group_pins = aspeed_pinctrl_get_group_pins,
@@ -2510,7 +2510,7 @@
 	.dt_free_map = pinctrl_utils_free_map,
 };
 
-static struct pinconf_ops aspeed_g5_conf_ops = {
+static const struct pinconf_ops aspeed_g5_conf_ops = {
 	.is_generic = true,
 	.pin_config_get = aspeed_pin_config_get,
 	.pin_config_set = aspeed_pin_config_set,

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 10/17] pinctrl: adi2: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
  2017-08-10 10:06 [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall
                   ` (8 preceding siblings ...)
  2017-08-10 10:06 ` [PATCH 09/17] pinctrl: aspeed: g5: " Julia Lawall
@ 2017-08-10 10:06 ` Julia Lawall
  2017-08-10 10:06 ` [PATCH 11/17] pinctrl: ingenic: " Julia Lawall
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Julia Lawall @ 2017-08-10 10:06 UTC (permalink / raw)
  To: Linus Walleij; +Cc: bhumirks, kernel-janitors, linux-gpio, linux-kernel

These structures are only stored in fields of a pinctrl_desc
structure (pctlops and pmxops) that are const. Make the
structures const as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/pinctrl/pinctrl-adi2.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-adi2.c b/drivers/pinctrl/pinctrl-adi2.c
index 54569a7..56aa181 100644
--- a/drivers/pinctrl/pinctrl-adi2.c
+++ b/drivers/pinctrl/pinctrl-adi2.c
@@ -612,7 +612,7 @@ static int adi_get_group_pins(struct pinctrl_dev *pctldev, unsigned selector,
 	return 0;
 }
 
-static struct pinctrl_ops adi_pctrl_ops = {
+static const struct pinctrl_ops adi_pctrl_ops = {
 	.get_groups_count = adi_get_groups_count,
 	.get_group_name = adi_get_group_name,
 	.get_group_pins = adi_get_group_pins,
@@ -696,7 +696,7 @@ static int adi_pinmux_request_gpio(struct pinctrl_dev *pctldev,
 	return 0;
 }
 
-static struct pinmux_ops adi_pinmux_ops = {
+static const struct pinmux_ops adi_pinmux_ops = {
 	.set_mux = adi_pinmux_set,
 	.get_functions_count = adi_pinmux_get_funcs_count,
 	.get_function_name = adi_pinmux_get_func_name,

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 11/17] pinctrl: ingenic: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
  2017-08-10 10:06 [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall
                   ` (9 preceding siblings ...)
  2017-08-10 10:06 ` [PATCH 10/17] pinctrl: adi2: " Julia Lawall
@ 2017-08-10 10:06 ` Julia Lawall
  2017-08-10 10:06 ` [PATCH 12/17] pinctrl: rza1: " Julia Lawall
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Julia Lawall @ 2017-08-10 10:06 UTC (permalink / raw)
  To: Linus Walleij; +Cc: bhumirks, kernel-janitors, linux-gpio, linux-kernel

These structures are only stored in fields of a pinctrl_desc
structure (confops, pctlops, and pmxops) that are const. Make the
structures const as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/pinctrl/pinctrl-ingenic.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-ingenic.c b/drivers/pinctrl/pinctrl-ingenic.c
index d8e8842..d847618 100644
--- a/drivers/pinctrl/pinctrl-ingenic.c
+++ b/drivers/pinctrl/pinctrl-ingenic.c
@@ -460,7 +460,7 @@ static inline bool ingenic_get_pin_config(struct ingenic_pinctrl *jzpc,
 	return val & BIT(idx);
 }
 
-static struct pinctrl_ops ingenic_pctlops = {
+static const struct pinctrl_ops ingenic_pctlops = {
 	.get_groups_count = pinctrl_generic_get_group_count,
 	.get_group_name = pinctrl_generic_get_group_name,
 	.get_group_pins = pinctrl_generic_get_group_pins,
@@ -543,7 +543,7 @@ static int ingenic_pinmux_gpio_set_direction(struct pinctrl_dev *pctldev,
 	return 0;
 }
 
-static struct pinmux_ops ingenic_pmxops = {
+static const struct pinmux_ops ingenic_pmxops = {
 	.get_functions_count = pinmux_generic_get_function_count,
 	.get_function_name = pinmux_generic_get_function_name,
 	.get_function_groups = pinmux_generic_get_function_groups,
@@ -696,7 +696,7 @@ static int ingenic_pinconf_group_set(struct pinctrl_dev *pctldev,
 	return 0;
 }
 
-static struct pinconf_ops ingenic_confops = {
+static const struct pinconf_ops ingenic_confops = {
 	.is_generic = true,
 	.pin_config_get = ingenic_pinconf_get,
 	.pin_config_set = ingenic_pinconf_set,

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 12/17] pinctrl: rza1: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
  2017-08-10 10:06 [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall
                   ` (10 preceding siblings ...)
  2017-08-10 10:06 ` [PATCH 11/17] pinctrl: ingenic: " Julia Lawall
@ 2017-08-10 10:06 ` Julia Lawall
  2017-08-10 10:06 ` [PATCH 13/17] pinctrl: tb10x: " Julia Lawall
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Julia Lawall @ 2017-08-10 10:06 UTC (permalink / raw)
  To: Linus Walleij; +Cc: bhumirks, kernel-janitors, linux-gpio, linux-kernel

This pinmux_ops structure is only stored in the const pmxops field
of a pinctrl_desc structure. Make the pinmux_ops structure const as
well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/pinctrl/pinctrl-rza1.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-rza1.c b/drivers/pinctrl/pinctrl-rza1.c
index 7e30134..f75d699 100644
--- a/drivers/pinctrl/pinctrl-rza1.c
+++ b/drivers/pinctrl/pinctrl-rza1.c
@@ -1026,7 +1026,7 @@ static int rza1_set_mux(struct pinctrl_dev *pctldev, unsigned int selector,
 	return 0;
 }
 
-static struct pinmux_ops rza1_pinmux_ops = {
+static const struct pinmux_ops rza1_pinmux_ops = {
 	.get_functions_count	= pinmux_generic_get_function_count,
 	.get_function_name	= pinmux_generic_get_function_name,
 	.get_function_groups	= pinmux_generic_get_function_groups,

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 13/17] pinctrl: tb10x: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
  2017-08-10 10:06 [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall
                   ` (11 preceding siblings ...)
  2017-08-10 10:06 ` [PATCH 12/17] pinctrl: rza1: " Julia Lawall
@ 2017-08-10 10:06 ` Julia Lawall
  2017-08-10 10:06 ` [PATCH 14/17] pinctrl: tz1090-pdc: " Julia Lawall
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Julia Lawall @ 2017-08-10 10:06 UTC (permalink / raw)
  To: Linus Walleij; +Cc: bhumirks, kernel-janitors, linux-gpio, linux-kernel

These structures are only stored in fields of a pinctrl_desc
structure (pctlops and pmxops) that are const. Make the
structures const as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/pinctrl/pinctrl-tb10x.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-tb10x.c b/drivers/pinctrl/pinctrl-tb10x.c
index 09d3500..2e90a6d 100644
--- a/drivers/pinctrl/pinctrl-tb10x.c
+++ b/drivers/pinctrl/pinctrl-tb10x.c
@@ -577,7 +577,7 @@ static int tb10x_dt_node_to_map(struct pinctrl_dev *pctl,
 	return ret;
 }
 
-static struct pinctrl_ops tb10x_pinctrl_ops = {
+static const struct pinctrl_ops tb10x_pinctrl_ops = {
 	.get_groups_count = tb10x_get_groups_count,
 	.get_group_name   = tb10x_get_group_name,
 	.get_group_pins   = tb10x_get_group_pins,
@@ -738,7 +738,7 @@ static int tb10x_pctl_set_mux(struct pinctrl_dev *pctl,
 	return 0;
 }
 
-static struct pinmux_ops tb10x_pinmux_ops = {
+static const struct pinmux_ops tb10x_pinmux_ops = {
 	.get_functions_count = tb10x_get_functions_count,
 	.get_function_name = tb10x_get_function_name,
 	.get_function_groups = tb10x_get_function_groups,

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 14/17] pinctrl: tz1090-pdc: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
  2017-08-10 10:06 [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall
                   ` (12 preceding siblings ...)
  2017-08-10 10:06 ` [PATCH 13/17] pinctrl: tb10x: " Julia Lawall
@ 2017-08-10 10:06 ` Julia Lawall
  2017-08-10 10:06 ` [PATCH 15/17] pinctrl: tz1090: " Julia Lawall
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Julia Lawall @ 2017-08-10 10:06 UTC (permalink / raw)
  To: Linus Walleij; +Cc: bhumirks, kernel-janitors, linux-gpio, linux-kernel

These structures are only stored in fields of a pinctrl_desc
structure (confops, pctlops, and pmxops) that are const. Make the
structures const as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---

This seems to target the metag architecture for which I don't know how to
compile.

 drivers/pinctrl/pinctrl-tz1090-pdc.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-tz1090-pdc.c b/drivers/pinctrl/pinctrl-tz1090-pdc.c
index e70e362..5cfa93c 100644
--- a/drivers/pinctrl/pinctrl-tz1090-pdc.c
+++ b/drivers/pinctrl/pinctrl-tz1090-pdc.c
@@ -486,7 +486,7 @@ static int tz1090_pdc_pinctrl_dt_node_to_map(struct pinctrl_dev *pctldev,
 	return 0;
 }
 
-static struct pinctrl_ops tz1090_pdc_pinctrl_ops = {
+static const struct pinctrl_ops tz1090_pdc_pinctrl_ops = {
 	.get_groups_count	= tz1090_pdc_pinctrl_get_groups_count,
 	.get_group_name		= tz1090_pdc_pinctrl_get_group_name,
 	.get_group_pins		= tz1090_pdc_pinctrl_get_group_pins,
@@ -631,7 +631,7 @@ static void tz1090_pdc_pinctrl_gpio_disable_free(
 	}
 }
 
-static struct pinmux_ops tz1090_pdc_pinmux_ops = {
+static const struct pinmux_ops tz1090_pdc_pinmux_ops = {
 	.get_functions_count	= tz1090_pdc_pinctrl_get_funcs_count,
 	.get_function_name	= tz1090_pdc_pinctrl_get_func_name,
 	.get_function_groups	= tz1090_pdc_pinctrl_get_func_groups,
@@ -905,7 +905,7 @@ static int tz1090_pdc_pinconf_group_set(struct pinctrl_dev *pctldev,
 	return 0;
 }
 
-static struct pinconf_ops tz1090_pdc_pinconf_ops = {
+static const struct pinconf_ops tz1090_pdc_pinconf_ops = {
 	.is_generic			= true,
 	.pin_config_get			= tz1090_pdc_pinconf_get,
 	.pin_config_set			= tz1090_pdc_pinconf_set,

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 15/17] pinctrl: tz1090: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
  2017-08-10 10:06 [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall
                   ` (13 preceding siblings ...)
  2017-08-10 10:06 ` [PATCH 14/17] pinctrl: tz1090-pdc: " Julia Lawall
@ 2017-08-10 10:06 ` Julia Lawall
  2017-08-10 10:06 ` [PATCH 16/17] pinctrl: ti-iodelay: " Julia Lawall
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 22+ messages in thread
From: Julia Lawall @ 2017-08-10 10:06 UTC (permalink / raw)
  To: Linus Walleij; +Cc: bhumirks, kernel-janitors, linux-gpio, linux-kernel

These structures are only stored in fields of a pinctrl_desc
structure (confops, pctlops, and pmxops) that are const. Make the
structures const as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---

This seems to target the metag architecture for which I don't know how to
compile.

 drivers/pinctrl/pinctrl-tz1090.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-tz1090.c b/drivers/pinctrl/pinctrl-tz1090.c
index 04cbe53..74d1ffc 100644
--- a/drivers/pinctrl/pinctrl-tz1090.c
+++ b/drivers/pinctrl/pinctrl-tz1090.c
@@ -1201,7 +1201,7 @@ static int tz1090_pinctrl_dt_node_to_map(struct pinctrl_dev *pctldev,
 	return 0;
 }
 
-static struct pinctrl_ops tz1090_pinctrl_ops = {
+static const struct pinctrl_ops tz1090_pinctrl_ops = {
 	.get_groups_count	= tz1090_pinctrl_get_groups_count,
 	.get_group_name		= tz1090_pinctrl_get_group_name,
 	.get_group_pins		= tz1090_pinctrl_get_group_pins,
@@ -1513,7 +1513,7 @@ static void tz1090_pinctrl_gpio_disable_free(struct pinctrl_dev *pctldev,
 	tz1090_pinctrl_gpio_select(pmx, pin, false);
 }
 
-static struct pinmux_ops tz1090_pinmux_ops = {
+static const struct pinmux_ops tz1090_pinmux_ops = {
 	.get_functions_count	= tz1090_pinctrl_get_funcs_count,
 	.get_function_name	= tz1090_pinctrl_get_func_name,
 	.get_function_groups	= tz1090_pinctrl_get_func_groups,
@@ -1920,7 +1920,7 @@ static int tz1090_pinconf_group_set(struct pinctrl_dev *pctldev,
 	return 0;
 }
 
-static struct pinconf_ops tz1090_pinconf_ops = {
+static const struct pinconf_ops tz1090_pinconf_ops = {
 	.is_generic			= true,
 	.pin_config_get			= tz1090_pinconf_get,
 	.pin_config_set			= tz1090_pinconf_set,

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 16/17] pinctrl: ti-iodelay: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
  2017-08-10 10:06 [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall
                   ` (14 preceding siblings ...)
  2017-08-10 10:06 ` [PATCH 15/17] pinctrl: tz1090: " Julia Lawall
@ 2017-08-10 10:06 ` Julia Lawall
  2017-08-10 10:06 ` [PATCH 17/17] pinctrl: vt8500: " Julia Lawall
  2017-08-22 12:43 ` [PATCH 00/17] " Linus Walleij
  17 siblings, 0 replies; 22+ messages in thread
From: Julia Lawall @ 2017-08-10 10:06 UTC (permalink / raw)
  To: Linus Walleij; +Cc: bhumirks, kernel-janitors, linux-gpio, linux-kernel

These structures are only stored in fields of a pinctrl_desc
structure (confops and pctlops) that are const. Make the
structures const as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/pinctrl/ti/pinctrl-ti-iodelay.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/ti/pinctrl-ti-iodelay.c b/drivers/pinctrl/ti/pinctrl-ti-iodelay.c
index 362c509..5c1b632 100644
--- a/drivers/pinctrl/ti/pinctrl-ti-iodelay.c
+++ b/drivers/pinctrl/ti/pinctrl-ti-iodelay.c
@@ -716,7 +716,7 @@ static void ti_iodelay_pinconf_group_dbg_show(struct pinctrl_dev *pctldev,
 }
 #endif
 
-static struct pinctrl_ops ti_iodelay_pinctrl_ops = {
+static const struct pinctrl_ops ti_iodelay_pinctrl_ops = {
 	.get_groups_count = pinctrl_generic_get_group_count,
 	.get_group_name = pinctrl_generic_get_group_name,
 	.get_group_pins = pinctrl_generic_get_group_pins,
@@ -726,7 +726,7 @@ static void ti_iodelay_pinconf_group_dbg_show(struct pinctrl_dev *pctldev,
 	.dt_node_to_map = ti_iodelay_dt_node_to_map,
 };
 
-static struct pinconf_ops ti_iodelay_pinctrl_pinconf_ops = {
+static const struct pinconf_ops ti_iodelay_pinctrl_pinconf_ops = {
 	.pin_config_group_get = ti_iodelay_pinconf_group_get,
 	.pin_config_group_set = ti_iodelay_pinconf_group_set,
 #ifdef CONFIG_DEBUG_FS

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 17/17] pinctrl: vt8500: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
  2017-08-10 10:06 [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall
                   ` (15 preceding siblings ...)
  2017-08-10 10:06 ` [PATCH 16/17] pinctrl: ti-iodelay: " Julia Lawall
@ 2017-08-10 10:06 ` Julia Lawall
  2017-08-22 12:43 ` [PATCH 00/17] " Linus Walleij
  17 siblings, 0 replies; 22+ messages in thread
From: Julia Lawall @ 2017-08-10 10:06 UTC (permalink / raw)
  To: Linus Walleij; +Cc: bhumirks, kernel-janitors, linux-gpio, linux-kernel

These structures are only stored in fields of a pinctrl_desc
structure (confops, pctlops, and pmxops) that are const. Make the
structures const as well.

Done with the help of Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/pinctrl/vt8500/pinctrl-wmt.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/vt8500/pinctrl-wmt.c b/drivers/pinctrl/vt8500/pinctrl-wmt.c
index 974e646..d73956b 100644
--- a/drivers/pinctrl/vt8500/pinctrl-wmt.c
+++ b/drivers/pinctrl/vt8500/pinctrl-wmt.c
@@ -163,7 +163,7 @@ static int wmt_pmx_gpio_set_direction(struct pinctrl_dev *pctldev,
 	return 0;
 }
 
-static struct pinmux_ops wmt_pinmux_ops = {
+static const struct pinmux_ops wmt_pinmux_ops = {
 	.get_functions_count = wmt_pmx_get_functions_count,
 	.get_function_name = wmt_pmx_get_function_name,
 	.get_function_groups = wmt_pmx_get_function_groups,
@@ -409,7 +409,7 @@ static int wmt_pctl_dt_node_to_map(struct pinctrl_dev *pctldev,
 	return err;
 }
 
-static struct pinctrl_ops wmt_pctl_ops = {
+static const struct pinctrl_ops wmt_pctl_ops = {
 	.get_groups_count = wmt_get_groups_count,
 	.get_group_name	= wmt_get_group_name,
 	.get_group_pins	= wmt_get_group_pins,
@@ -472,7 +472,7 @@ static int wmt_pinconf_set(struct pinctrl_dev *pctldev, unsigned pin,
 	return 0;
 }
 
-static struct pinconf_ops wmt_pinconf_ops = {
+static const struct pinconf_ops wmt_pinconf_ops = {
 	.pin_config_get = wmt_pinconf_get,
 	.pin_config_set = wmt_pinconf_set,
 };

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH 04/17] pinctrl: st: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
  2017-08-10 10:06 ` [PATCH 04/17] pinctrl: st: " Julia Lawall
@ 2017-08-10 11:03   ` Patrice CHOTARD
  0 siblings, 0 replies; 22+ messages in thread
From: Patrice CHOTARD @ 2017-08-10 11:03 UTC (permalink / raw)
  To: Julia Lawall
  Cc: bhumirks, kernel-janitors, Linus Walleij, linux-arm-kernel,
	linux-gpio, linux-kernel

Hi Julia

On 08/10/2017 12:06 PM, Julia Lawall wrote:
> These structures are only stored in fields of a pinctrl_desc
> structure (confops, pctlops, and pmxops) that are const. Make the
> structures const as well.
> 
> Done with the help of Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> ---
>   drivers/pinctrl/pinctrl-st.c |    6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
> index 7ac8b1e..aed8006 100644
> --- a/drivers/pinctrl/pinctrl-st.c
> +++ b/drivers/pinctrl/pinctrl-st.c
> @@ -861,7 +861,7 @@ static void st_pctl_dt_free_map(struct pinctrl_dev *pctldev,
>   {
>   }
>   
> -static struct pinctrl_ops st_pctlops = {
> +static const struct pinctrl_ops st_pctlops = {
>   	.get_groups_count	= st_pctl_get_groups_count,
>   	.get_group_pins		= st_pctl_get_group_pins,
>   	.get_group_name		= st_pctl_get_group_name,
> @@ -928,7 +928,7 @@ static int st_pmx_set_gpio_direction(struct pinctrl_dev *pctldev,
>   	return 0;
>   }
>   
> -static struct pinmux_ops st_pmxops = {
> +static const struct pinmux_ops st_pmxops = {
>   	.get_functions_count	= st_pmx_get_funcs_count,
>   	.get_function_name	= st_pmx_get_fname,
>   	.get_function_groups	= st_pmx_get_groups,
> @@ -1025,7 +1025,7 @@ static void st_pinconf_dbg_show(struct pinctrl_dev *pctldev,
>   		ST_PINCONF_UNPACK_RT_DELAY(config));
>   }
>   
> -static struct pinconf_ops st_confops = {
> +static const struct pinconf_ops st_confops = {
>   	.pin_config_get		= st_pinconf_get,
>   	.pin_config_set		= st_pinconf_set,
>   	.pin_config_dbg_show	= st_pinconf_dbg_show,
> 

Acked-by: Patrice Chotard <patrice.chotard@st.com>

Thanks

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 02/17] pinctrl: artpec6: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
  2017-08-10 10:06 ` [PATCH 02/17] pinctrl: artpec6: " Julia Lawall
@ 2017-08-10 12:31   ` Lars Persson
  0 siblings, 0 replies; 22+ messages in thread
From: Lars Persson @ 2017-08-10 12:31 UTC (permalink / raw)
  To: Julia Lawall, Jesper Nilsson
  Cc: bhumirks, kernel-janitors, Lars Persson, Niklas Cassel,
	Linus Walleij, linux-arm-kernel, linux-gpio, linux-kernel



On 08/10/2017 12:06 PM, Julia Lawall wrote:
> This pinctrl_ops structure is only stored in the const pctlops
> field of a pinctrl_desc structure. Make the pinctrl_ops structure
> const as well.
> 
> Done with the help of Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
> 
> ---
>   drivers/pinctrl/pinctrl-artpec6.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>  

Hi,

Acked-by: Lars Persson <lars.persson@axis.com>

BR,
  Lars

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 07/17] pinctrl: digicolor: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
  2017-08-10 10:06 ` [PATCH 07/17] pinctrl: digicolor: " Julia Lawall
@ 2017-08-10 12:39   ` Baruch Siach
  0 siblings, 0 replies; 22+ messages in thread
From: Baruch Siach @ 2017-08-10 12:39 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Linus Walleij, bhumirks, kernel-janitors, linux-gpio,
	linux-arm-kernel, linux-kernel

Hi Julia,

On Thu, Aug 10, 2017 at 12:06:19PM +0200, Julia Lawall wrote:
> These structures are only stored in fields of a pinctrl_desc
> structure (pctlops and pmxops) that are const. Make the
> structures const as well.
> 
> Done with the help of Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

Acked-by: Baruch Siach <baruch@tkos.co.il>

Thanks,
baruch

> ---
>  drivers/pinctrl/pinctrl-digicolor.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pinctrl/pinctrl-digicolor.c b/drivers/pinctrl/pinctrl-digicolor.c
> index 639a57e..ce269ce 100644
> --- a/drivers/pinctrl/pinctrl-digicolor.c
> +++ b/drivers/pinctrl/pinctrl-digicolor.c
> @@ -79,7 +79,7 @@ static int dc_get_group_pins(struct pinctrl_dev *pctldev, unsigned selector,
>  	return 0;
>  }
>  
> -static struct pinctrl_ops dc_pinctrl_ops = {
> +static const struct pinctrl_ops dc_pinctrl_ops = {
>  	.get_groups_count	= dc_get_groups_count,
>  	.get_group_name		= dc_get_group_name,
>  	.get_group_pins		= dc_get_group_pins,
> @@ -161,7 +161,7 @@ static int dc_pmx_request_gpio(struct pinctrl_dev *pcdev,
>  	return 0;
>  }
>  
> -static struct pinmux_ops dc_pmxops = {
> +static const struct pinmux_ops dc_pmxops = {
>  	.get_functions_count	= dc_get_functions_count,
>  	.get_function_name	= dc_get_fname,
>  	.get_function_groups	= dc_get_groups,

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
  2017-08-10 10:06 [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall
                   ` (16 preceding siblings ...)
  2017-08-10 10:06 ` [PATCH 17/17] pinctrl: vt8500: " Julia Lawall
@ 2017-08-22 12:43 ` Linus Walleij
  17 siblings, 0 replies; 22+ messages in thread
From: Linus Walleij @ 2017-08-22 12:43 UTC (permalink / raw)
  To: Julia Lawall
  Cc: linux-arm-kernel, Bhumika Goyal, kernel-janitors, linux-kernel,
	linux-gpio, linux-arm-kernel

On Thu, Aug 10, 2017 at 12:06 PM, Julia Lawall <Julia.Lawall@lip6.fr> wrote:

> These structures are only stored in fields of a pinctrl_desc
> structure that are const. Make the structures const as well.
>
> Done with the help of Coccinelle.

Thanks Julia, all patches applied with relevant ACKs collected.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2017-08-22 12:43 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-10 10:06 [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall
2017-08-10 10:06 ` [PATCH 01/17] pinctrl: bcm281xx: " Julia Lawall
2017-08-10 10:06 ` [PATCH 02/17] pinctrl: artpec6: " Julia Lawall
2017-08-10 12:31   ` Lars Persson
2017-08-10 10:06 ` [PATCH 03/17] pinctrl: armada-37xx: " Julia Lawall
2017-08-10 10:06 ` [PATCH 04/17] pinctrl: st: " Julia Lawall
2017-08-10 11:03   ` Patrice CHOTARD
2017-08-10 10:06 ` [PATCH 05/17] pinctrl: sirf: atlas7: " Julia Lawall
2017-08-10 10:06 ` [PATCH 06/17] pinctrl: sirf: " Julia Lawall
2017-08-10 10:06 ` [PATCH 07/17] pinctrl: digicolor: " Julia Lawall
2017-08-10 12:39   ` Baruch Siach
2017-08-10 10:06 ` [PATCH 08/17] pinctrl: aspeed: g4: " Julia Lawall
2017-08-10 10:06 ` [PATCH 09/17] pinctrl: aspeed: g5: " Julia Lawall
2017-08-10 10:06 ` [PATCH 10/17] pinctrl: adi2: " Julia Lawall
2017-08-10 10:06 ` [PATCH 11/17] pinctrl: ingenic: " Julia Lawall
2017-08-10 10:06 ` [PATCH 12/17] pinctrl: rza1: " Julia Lawall
2017-08-10 10:06 ` [PATCH 13/17] pinctrl: tb10x: " Julia Lawall
2017-08-10 10:06 ` [PATCH 14/17] pinctrl: tz1090-pdc: " Julia Lawall
2017-08-10 10:06 ` [PATCH 15/17] pinctrl: tz1090: " Julia Lawall
2017-08-10 10:06 ` [PATCH 16/17] pinctrl: ti-iodelay: " Julia Lawall
2017-08-10 10:06 ` [PATCH 17/17] pinctrl: vt8500: " Julia Lawall
2017-08-22 12:43 ` [PATCH 00/17] " Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).