2013-06-18 09:19:21

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 1/4] pinctrl: bcm2835: Staticize bcm2835_gpio_pins

'bcm2835_gpio_pins' is used only in this file.

Signed-off-by: Sachin Kamat <[email protected]>
Cc: Stephen Warren <[email protected]>
---
drivers/pinctrl/pinctrl-bcm2835.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/pinctrl-bcm2835.c b/drivers/pinctrl/pinctrl-bcm2835.c
index c8f20a3..a1c88b3 100644
--- a/drivers/pinctrl/pinctrl-bcm2835.c
+++ b/drivers/pinctrl/pinctrl-bcm2835.c
@@ -113,7 +113,7 @@ static struct lock_class_key gpio_lock_class;

/* pins are just named GPIO0..GPIO53 */
#define BCM2835_GPIO_PIN(a) PINCTRL_PIN(a, "gpio" #a)
-struct pinctrl_pin_desc bcm2835_gpio_pins[] = {
+static struct pinctrl_pin_desc bcm2835_gpio_pins[] = {
BCM2835_GPIO_PIN(0),
BCM2835_GPIO_PIN(1),
BCM2835_GPIO_PIN(2),
--
1.7.9.5


2013-06-18 09:19:27

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 3/4] pinctrl: spear/plgpio: Staticize spear310_o2p

'spear310_o2p' is referenced only in this file.

Signed-off-by: Sachin Kamat <[email protected]>
Cc: Viresh Kumar <[email protected]>
---
drivers/pinctrl/spear/pinctrl-plgpio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear/pinctrl-plgpio.c
index 6b090be..0a7f0bdb 100644
--- a/drivers/pinctrl/spear/pinctrl-plgpio.c
+++ b/drivers/pinctrl/spear/pinctrl-plgpio.c
@@ -441,7 +441,7 @@ static int spear310_p2o(int pin)
return offset;
}

-int spear310_o2p(int offset)
+static int spear310_o2p(int offset)
{
if (offset <= 3)
return 101 - offset;
--
1.7.9.5

2013-06-18 09:19:44

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 4/4] pinctrl: Staticize local symbols

Symbols referenced only in this file are made static.

Signed-off-by: Sachin Kamat <[email protected]>
Cc: Patrice Chotard <[email protected]>
---
drivers/pinctrl/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 32eb7e2..86b5370 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -41,13 +41,13 @@
static bool pinctrl_dummy_state;

/* Mutex taken to protect pinctrl_list */
-DEFINE_MUTEX(pinctrl_list_mutex);
+static DEFINE_MUTEX(pinctrl_list_mutex);

/* Mutex taken to protect pinctrl_maps */
DEFINE_MUTEX(pinctrl_maps_mutex);

/* Mutex taken to protect pinctrldev_list */
-DEFINE_MUTEX(pinctrldev_list_mutex);
+static DEFINE_MUTEX(pinctrldev_list_mutex);

/* Global list of pin control devices (struct pinctrl_dev) */
static LIST_HEAD(pinctrldev_list);
--
1.7.9.5

2013-06-18 09:20:13

by Sachin Kamat

[permalink] [raw]
Subject: [PATCH 2/4] pinctrl: nomadik: Staticize local symbols

Some symbols referenced only in this file are made static.

Signed-off-by: Sachin Kamat <[email protected]>
---
drivers/pinctrl/pinctrl-nomadik.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-nomadik.c b/drivers/pinctrl/pinctrl-nomadik.c
index 7c44f1a5..73b14df 100644
--- a/drivers/pinctrl/pinctrl-nomadik.c
+++ b/drivers/pinctrl/pinctrl-nomadik.c
@@ -1309,7 +1309,7 @@ static int nmk_gpio_irq_map(struct irq_domain *d, unsigned int irq,
return 0;
}

-const struct irq_domain_ops nmk_gpio_irq_simple_ops = {
+static const struct irq_domain_ops nmk_gpio_irq_simple_ops = {
.map = nmk_gpio_irq_map,
.xlate = irq_domain_xlate_twocell,
};
@@ -1681,7 +1681,7 @@ static bool nmk_pinctrl_dt_get_config(struct device_node *np,
return has_config;
}

-int nmk_pinctrl_dt_subnode_to_map(struct pinctrl_dev *pctldev,
+static int nmk_pinctrl_dt_subnode_to_map(struct pinctrl_dev *pctldev,
struct device_node *np,
struct pinctrl_map **map,
unsigned *reserved_maps,
@@ -1740,7 +1740,7 @@ exit:
return ret;
}

-int nmk_pinctrl_dt_node_to_map(struct pinctrl_dev *pctldev,
+static int nmk_pinctrl_dt_node_to_map(struct pinctrl_dev *pctldev,
struct device_node *np_config,
struct pinctrl_map **map, unsigned *num_maps)
{
--
1.7.9.5

2013-06-18 09:24:49

by Viresh Kumar

[permalink] [raw]
Subject: Re: [PATCH 3/4] pinctrl: spear/plgpio: Staticize spear310_o2p

On 18 June 2013 14:34, Sachin Kamat <[email protected]> wrote:
> 'spear310_o2p' is referenced only in this file.
>
> Signed-off-by: Sachin Kamat <[email protected]>
> Cc: Viresh Kumar <[email protected]>
> ---
> drivers/pinctrl/spear/pinctrl-plgpio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/spear/pinctrl-plgpio.c b/drivers/pinctrl/spear/pinctrl-plgpio.c
> index 6b090be..0a7f0bdb 100644
> --- a/drivers/pinctrl/spear/pinctrl-plgpio.c
> +++ b/drivers/pinctrl/spear/pinctrl-plgpio.c
> @@ -441,7 +441,7 @@ static int spear310_p2o(int pin)
> return offset;
> }
>
> -int spear310_o2p(int offset)
> +static int spear310_o2p(int offset)
> {
> if (offset <= 3)
> return 101 - offset;

Acked-by: Viresh Kumar <[email protected]>

2013-06-18 14:51:04

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 1/4] pinctrl: bcm2835: Staticize bcm2835_gpio_pins

On Tue, Jun 18, 2013 at 11:04 AM, Sachin Kamat <[email protected]> wrote:

> 'bcm2835_gpio_pins' is used only in this file.
>
> Signed-off-by: Sachin Kamat <[email protected]>
> Cc: Stephen Warren <[email protected]>

Patch applied.

Thanks,
Linus Walleij

2013-06-18 14:52:06

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 2/4] pinctrl: nomadik: Staticize local symbols

On Tue, Jun 18, 2013 at 11:04 AM, Sachin Kamat <[email protected]> wrote:

> Some symbols referenced only in this file are made static.
>
> Signed-off-by: Sachin Kamat <[email protected]>

Patch applied.

Yours,
Linus Walleij

2013-06-18 14:53:18

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 3/4] pinctrl: spear/plgpio: Staticize spear310_o2p

On Tue, Jun 18, 2013 at 11:04 AM, Sachin Kamat <[email protected]> wrote:

> 'spear310_o2p' is referenced only in this file.
>
> Signed-off-by: Sachin Kamat <[email protected]>
> Cc: Viresh Kumar <[email protected]>

Patch applied with Viresh's ACK.

Thanks,
Linus Walleij

2013-06-18 14:55:17

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 4/4] pinctrl: Staticize local symbols

On Tue, Jun 18, 2013 at 11:04 AM, Sachin Kamat <[email protected]> wrote:

> Symbols referenced only in this file are made static.
>
> Signed-off-by: Sachin Kamat <[email protected]>
> Cc: Patrice Chotard <[email protected]>

Excellent observation Sachin, patch applied.

Yours,
Linus Walleij

2013-06-18 15:51:40

by Sachin Kamat

[permalink] [raw]
Subject: Re: [PATCH 4/4] pinctrl: Staticize local symbols

On 18 June 2013 20:25, Linus Walleij <[email protected]> wrote:
> On Tue, Jun 18, 2013 at 11:04 AM, Sachin Kamat <[email protected]> wrote:
>
>> Symbols referenced only in this file are made static.
>>
>> Signed-off-by: Sachin Kamat <[email protected]>
>> Cc: Patrice Chotard <[email protected]>
>
> Excellent observation Sachin, patch applied.

Thanks.




--
With warm regards,
Sachin