linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][next] pinctrl: actions: make s900_functions, s900_padinfo and s900_pads static
@ 2018-04-30 13:04 Colin King
  2018-04-30 13:26 ` Manivannan Sadhasivam
  2018-05-02 11:46 ` Linus Walleij
  0 siblings, 2 replies; 3+ messages in thread
From: Colin King @ 2018-04-30 13:04 UTC (permalink / raw)
  To: Linus Walleij, Manivannan Sadhasivam, linux-gpio
  Cc: kernel-janitors, linux-kernel

From: Colin Ian King <colin.king@canonical.com>

s900_functions, s900_padinfo and s900_pads are local to the source and do
not need to be in global scope, so make them static.

Cleans up sparse warnings:
drivers/pinctrl/actions/pinctrl-s900.c:1445:30: warning: symbol
's900_functions' was not declared. Should it be static?
drivers/pinctrl/actions/pinctrl-s900.c:1664:20: warning: symbol
's900_padinfo' was not declared. Should it be static?
drivers/pinctrl/actions/pinctrl-s900.c:207:31: warning: symbol
's900_pads' was not declared. Should it be static?

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/pinctrl/actions/pinctrl-s900.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/actions/pinctrl-s900.c b/drivers/pinctrl/actions/pinctrl-s900.c
index 49a04e224ee6..08d93f8fc086 100644
--- a/drivers/pinctrl/actions/pinctrl-s900.c
+++ b/drivers/pinctrl/actions/pinctrl-s900.c
@@ -204,7 +204,7 @@
 #define NUM_PADS		(_PIN(3) + 1)
 
 /* Pad names as specified in datasheet */
-const struct pinctrl_pin_desc s900_pads[] = {
+static const struct pinctrl_pin_desc s900_pads[] = {
 	PINCTRL_PIN(ETH_TXD0, "eth_txd0"),
 	PINCTRL_PIN(ETH_TXD1, "eth_txd1"),
 	PINCTRL_PIN(ETH_TXEN, "eth_txen"),
@@ -1442,7 +1442,7 @@ static const char * const sirq2_groups[] = {
 		.ngroups = ARRAY_SIZE(fname##_groups),	\
 	}
 
-const struct owl_pinmux_func s900_functions[] = {
+static const struct owl_pinmux_func s900_functions[] = {
 	[S900_MUX_ERAM] = FUNCTION(eram),
 	[S900_MUX_ETH_RMII] = FUNCTION(eth_rmii),
 	[S900_MUX_ETH_SMII] = FUNCTION(eth_smii),
@@ -1661,7 +1661,7 @@ static PAD_ST_CONF(I2S_MCLK0, 1, 0, 1);
 	}
 
 /* Pad info table */
-struct owl_padinfo s900_padinfo[NUM_PADS] = {
+static struct owl_padinfo s900_padinfo[NUM_PADS] = {
 	[ETH_TXD0] = PAD_INFO_ST(ETH_TXD0),
 	[ETH_TXD1] = PAD_INFO_ST(ETH_TXD1),
 	[ETH_TXEN] = PAD_INFO_ST(ETH_TXEN),
-- 
2.17.0

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

* Re: [PATCH][next] pinctrl: actions: make s900_functions, s900_padinfo and s900_pads static
  2018-04-30 13:04 [PATCH][next] pinctrl: actions: make s900_functions, s900_padinfo and s900_pads static Colin King
@ 2018-04-30 13:26 ` Manivannan Sadhasivam
  2018-05-02 11:46 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Manivannan Sadhasivam @ 2018-04-30 13:26 UTC (permalink / raw)
  To: Colin King; +Cc: Linus Walleij, linux-gpio, kernel-janitors, linux-kernel

On Mon, Apr 30, 2018 at 02:04:34PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> s900_functions, s900_padinfo and s900_pads are local to the source and do
> not need to be in global scope, so make them static.
> 
> Cleans up sparse warnings:
> drivers/pinctrl/actions/pinctrl-s900.c:1445:30: warning: symbol
> 's900_functions' was not declared. Should it be static?
> drivers/pinctrl/actions/pinctrl-s900.c:1664:20: warning: symbol
> 's900_padinfo' was not declared. Should it be static?
> drivers/pinctrl/actions/pinctrl-s900.c:207:31: warning: symbol
> 's900_pads' was not declared. Should it be static?
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Looks good.

Acked-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> 

Thanks,
Mani

> ---
>  drivers/pinctrl/actions/pinctrl-s900.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/pinctrl/actions/pinctrl-s900.c b/drivers/pinctrl/actions/pinctrl-s900.c
> index 49a04e224ee6..08d93f8fc086 100644
> --- a/drivers/pinctrl/actions/pinctrl-s900.c
> +++ b/drivers/pinctrl/actions/pinctrl-s900.c
> @@ -204,7 +204,7 @@
>  #define NUM_PADS		(_PIN(3) + 1)
>  
>  /* Pad names as specified in datasheet */
> -const struct pinctrl_pin_desc s900_pads[] = {
> +static const struct pinctrl_pin_desc s900_pads[] = {
>  	PINCTRL_PIN(ETH_TXD0, "eth_txd0"),
>  	PINCTRL_PIN(ETH_TXD1, "eth_txd1"),
>  	PINCTRL_PIN(ETH_TXEN, "eth_txen"),
> @@ -1442,7 +1442,7 @@ static const char * const sirq2_groups[] = {
>  		.ngroups = ARRAY_SIZE(fname##_groups),	\
>  	}
>  
> -const struct owl_pinmux_func s900_functions[] = {
> +static const struct owl_pinmux_func s900_functions[] = {
>  	[S900_MUX_ERAM] = FUNCTION(eram),
>  	[S900_MUX_ETH_RMII] = FUNCTION(eth_rmii),
>  	[S900_MUX_ETH_SMII] = FUNCTION(eth_smii),
> @@ -1661,7 +1661,7 @@ static PAD_ST_CONF(I2S_MCLK0, 1, 0, 1);
>  	}
>  
>  /* Pad info table */
> -struct owl_padinfo s900_padinfo[NUM_PADS] = {
> +static struct owl_padinfo s900_padinfo[NUM_PADS] = {
>  	[ETH_TXD0] = PAD_INFO_ST(ETH_TXD0),
>  	[ETH_TXD1] = PAD_INFO_ST(ETH_TXD1),
>  	[ETH_TXEN] = PAD_INFO_ST(ETH_TXEN),
> -- 
> 2.17.0
> 

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

* Re: [PATCH][next] pinctrl: actions: make s900_functions, s900_padinfo and s900_pads static
  2018-04-30 13:04 [PATCH][next] pinctrl: actions: make s900_functions, s900_padinfo and s900_pads static Colin King
  2018-04-30 13:26 ` Manivannan Sadhasivam
@ 2018-05-02 11:46 ` Linus Walleij
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2018-05-02 11:46 UTC (permalink / raw)
  To: Colin King
  Cc: Manivannan Sadhasivam, open list:GPIO SUBSYSTEM, kernel-janitors,
	linux-kernel

On Mon, Apr 30, 2018 at 3:04 PM, Colin King <colin.king@canonical.com> wrote:

> From: Colin Ian King <colin.king@canonical.com>
>
> s900_functions, s900_padinfo and s900_pads are local to the source and do
> not need to be in global scope, so make them static.
>
> Cleans up sparse warnings:
> drivers/pinctrl/actions/pinctrl-s900.c:1445:30: warning: symbol
> 's900_functions' was not declared. Should it be static?
> drivers/pinctrl/actions/pinctrl-s900.c:1664:20: warning: symbol
> 's900_padinfo' was not declared. Should it be static?
> drivers/pinctrl/actions/pinctrl-s900.c:207:31: warning: symbol
> 's900_pads' was not declared. Should it be static?
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Patch applied with Manivannan's ACK, I got the same patch from
the 0day build robot, but I prefer human contributors to I pick
this one.

Yours,
Linus Walleij

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

end of thread, other threads:[~2018-05-02 11:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-30 13:04 [PATCH][next] pinctrl: actions: make s900_functions, s900_padinfo and s900_pads static Colin King
2018-04-30 13:26 ` Manivannan Sadhasivam
2018-05-02 11:46 ` 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).