Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1708399 > unrolled thread

[PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures

Started byJulia Lawall <Julia.Lawall@lip6.fr>
First post2017-08-10 12:40 +0200
Last post2017-08-10 12:40 +0200
Articles 19 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-10 12:40 +0200
    [PATCH 17/17] pinctrl: vt8500: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-10 12:40 +0200
    [PATCH 09/17] pinctrl: aspeed: g5: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-10 12:40 +0200
    [PATCH 08/17] pinctrl: aspeed: g4: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-10 12:40 +0200
    [PATCH 15/17] pinctrl: tz1090: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-10 12:40 +0200
    [PATCH 05/17] pinctrl: sirf: atlas7: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-10 12:40 +0200
    [PATCH 07/17] pinctrl: digicolor: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-10 12:40 +0200
      Re: [PATCH 07/17] pinctrl: digicolor: constify pinconf_ops,  pinctrl_ops, and pinmux_ops structures Baruch Siach <baruch@tkos.co.il> - 2017-08-10 14:40 +0200
    [PATCH 11/17] pinctrl: ingenic: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-10 12:40 +0200
    [PATCH 06/17] pinctrl: sirf: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-10 12:40 +0200
    [PATCH 03/17] pinctrl: armada-37xx: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-10 12:40 +0200
    [PATCH 04/17] pinctrl: st: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-10 12:40 +0200
      Re: [PATCH 04/17] pinctrl: st: constify pinconf_ops, pinctrl_ops, and  pinmux_ops structures Patrice CHOTARD <patrice.chotard@st.com> - 2017-08-10 13:10 +0200
    [PATCH 16/17] pinctrl: ti-iodelay: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-10 12:40 +0200
    [PATCH 13/17] pinctrl: tb10x: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-10 12:40 +0200
    [PATCH 14/17] pinctrl: tz1090-pdc: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-10 12:40 +0200
    [PATCH 10/17] pinctrl: adi2: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-10 12:40 +0200
    [PATCH 01/17] pinctrl: bcm281xx: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-10 12:40 +0200
    [PATCH 12/17] pinctrl: rza1: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-10 12:40 +0200

#1708399 — [PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2017-08-10 12:40 +0200
Subject[PATCH 00/17] constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
Message-ID<ucT2F-4pl-3@gated-at.bofh.it>
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(-)

[toc] | [next] | [standalone]


#1708401 — [PATCH 17/17] pinctrl: vt8500: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2017-08-10 12:40 +0200
Subject[PATCH 17/17] pinctrl: vt8500: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
Message-ID<ucT2G-4pl-9@gated-at.bofh.it>
In reply to#1708399
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,
 };

[toc] | [prev] | [next] | [standalone]


#1708402 — [PATCH 09/17] pinctrl: aspeed: g5: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2017-08-10 12:40 +0200
Subject[PATCH 09/17] pinctrl: aspeed: g5: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
Message-ID<ucT2G-4pl-11@gated-at.bofh.it>
In reply to#1708399
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,

[toc] | [prev] | [next] | [standalone]


#1708404 — [PATCH 08/17] pinctrl: aspeed: g4: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2017-08-10 12:40 +0200
Subject[PATCH 08/17] pinctrl: aspeed: g4: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
Message-ID<ucT2G-4pl-15@gated-at.bofh.it>
In reply to#1708399
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,

[toc] | [prev] | [next] | [standalone]


#1708405 — [PATCH 15/17] pinctrl: tz1090: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2017-08-10 12:40 +0200
Subject[PATCH 15/17] pinctrl: tz1090: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
Message-ID<ucT2G-4pl-19@gated-at.bofh.it>
In reply to#1708399
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,

[toc] | [prev] | [next] | [standalone]


#1708406 — [PATCH 05/17] pinctrl: sirf: atlas7: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2017-08-10 12:40 +0200
Subject[PATCH 05/17] pinctrl: sirf: atlas7: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
Message-ID<ucT2G-4pl-17@gated-at.bofh.it>
In reply to#1708399
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,

[toc] | [prev] | [next] | [standalone]


#1708408 — [PATCH 07/17] pinctrl: digicolor: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2017-08-10 12:40 +0200
Subject[PATCH 07/17] pinctrl: digicolor: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
Message-ID<ucT2G-4pl-23@gated-at.bofh.it>
In reply to#1708399
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,

[toc] | [prev] | [next] | [standalone]


#1708588 — Re: [PATCH 07/17] pinctrl: digicolor: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures

FromBaruch Siach <baruch@tkos.co.il>
Date2017-08-10 14:40 +0200
SubjectRe: [PATCH 07/17] pinctrl: digicolor: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
Message-ID<ucUUO-5zH-19@gated-at.bofh.it>
In reply to#1708408
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 -

[toc] | [prev] | [next] | [standalone]


#1708409 — [PATCH 11/17] pinctrl: ingenic: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2017-08-10 12:40 +0200
Subject[PATCH 11/17] pinctrl: ingenic: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
Message-ID<ucT2G-4pl-25@gated-at.bofh.it>
In reply to#1708399
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,

[toc] | [prev] | [next] | [standalone]


#1708410 — [PATCH 06/17] pinctrl: sirf: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2017-08-10 12:40 +0200
Subject[PATCH 06/17] pinctrl: sirf: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
Message-ID<ucT2G-4pl-29@gated-at.bofh.it>
In reply to#1708399
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,

[toc] | [prev] | [next] | [standalone]


#1708411 — [PATCH 03/17] pinctrl: armada-37xx: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2017-08-10 12:40 +0200
Subject[PATCH 03/17] pinctrl: armada-37xx: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
Message-ID<ucT2G-4pl-31@gated-at.bofh.it>
In reply to#1708399
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,

[toc] | [prev] | [next] | [standalone]


#1708412 — [PATCH 04/17] pinctrl: st: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2017-08-10 12:40 +0200
Subject[PATCH 04/17] pinctrl: st: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
Message-ID<ucT2H-4pl-33@gated-at.bofh.it>
In reply to#1708399
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,

[toc] | [prev] | [next] | [standalone]


#1708445 — Re: [PATCH 04/17] pinctrl: st: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures

FromPatrice CHOTARD <patrice.chotard@st.com>
Date2017-08-10 13:10 +0200
SubjectRe: [PATCH 04/17] pinctrl: st: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
Message-ID<ucTvJ-4OI-43@gated-at.bofh.it>
In reply to#1708412
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

[toc] | [prev] | [next] | [standalone]


#1708413 — [PATCH 16/17] pinctrl: ti-iodelay: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2017-08-10 12:40 +0200
Subject[PATCH 16/17] pinctrl: ti-iodelay: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
Message-ID<ucT2H-4pl-37@gated-at.bofh.it>
In reply to#1708399
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

[toc] | [prev] | [next] | [standalone]


#1708414 — [PATCH 13/17] pinctrl: tb10x: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2017-08-10 12:40 +0200
Subject[PATCH 13/17] pinctrl: tb10x: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
Message-ID<ucT2H-4pl-39@gated-at.bofh.it>
In reply to#1708399
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,

[toc] | [prev] | [next] | [standalone]


#1708415 — [PATCH 14/17] pinctrl: tz1090-pdc: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2017-08-10 12:40 +0200
Subject[PATCH 14/17] pinctrl: tz1090-pdc: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
Message-ID<ucT2H-4pl-41@gated-at.bofh.it>
In reply to#1708399
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,

[toc] | [prev] | [next] | [standalone]


#1708417 — [PATCH 10/17] pinctrl: adi2: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2017-08-10 12:40 +0200
Subject[PATCH 10/17] pinctrl: adi2: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
Message-ID<ucT2H-4pl-45@gated-at.bofh.it>
In reply to#1708399
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,

[toc] | [prev] | [next] | [standalone]


#1708418 — [PATCH 01/17] pinctrl: bcm281xx: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2017-08-10 12:40 +0200
Subject[PATCH 01/17] pinctrl: bcm281xx: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
Message-ID<ucT2H-4pl-47@gated-at.bofh.it>
In reply to#1708399
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,
 };

[toc] | [prev] | [next] | [standalone]


#1708419 — [PATCH 12/17] pinctrl: rza1: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2017-08-10 12:40 +0200
Subject[PATCH 12/17] pinctrl: rza1: constify pinconf_ops, pinctrl_ops, and pinmux_ops structures
Message-ID<ucT2H-4pl-49@gated-at.bofh.it>
In reply to#1708399
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,

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web