linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] pinctrl: fix incorrect inline keyword in multiple drivers
@ 2016-06-13 15:18 Arnd Bergmann
  2016-06-13 15:18 ` [PATCH 2/2] pinctrl: max77620: select PINMUX Arnd Bergmann
  2016-06-14  6:55 ` [PATCH 1/2] pinctrl: fix incorrect inline keyword in multiple drivers Linus Walleij
  0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2016-06-13 15:18 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Arnd Bergmann, Jean-Christophe Plagniol-Villard, Heiko Stuebner,
	Srinivas Kandagatla, Maxime Coquelin, Patrice Chotard, Shawn Guo,
	Adrian Alonso, Thomas Gleixner, linux-gpio, linux-kernel,
	linux-arm-kernel, linux-rockchip, kernel

When building with 'make W=1', we get harmless warnings about
five drivers in drivers/pinctrl, which all contain a copy of
the same line:

drivers/pinctrl/freescale/pinctrl-imx1-core.c:160:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration]

This replaces the somewhat nonstandard 'static const inline'
with 'static inline const', which has the same meaning but
does not cause this warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/pinctrl/freescale/pinctrl-imx.c       | 2 +-
 drivers/pinctrl/freescale/pinctrl-imx1-core.c | 2 +-
 drivers/pinctrl/pinctrl-at91.c                | 2 +-
 drivers/pinctrl/pinctrl-rockchip.c            | 2 +-
 drivers/pinctrl/pinctrl-st.c                  | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c
index 309d31d61390..491d2d244f56 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx.c
@@ -46,7 +46,7 @@ struct imx_pinctrl {
 	const struct imx_pinctrl_soc_info *info;
 };
 
-static const inline struct imx_pin_group *imx_pinctrl_find_group_by_name(
+static inline const struct imx_pin_group *imx_pinctrl_find_group_by_name(
 				const struct imx_pinctrl_soc_info *info,
 				const char *name)
 {
diff --git a/drivers/pinctrl/freescale/pinctrl-imx1-core.c b/drivers/pinctrl/freescale/pinctrl-imx1-core.c
index b4400cb19b61..38d39388d7a4 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx1-core.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx1-core.c
@@ -157,7 +157,7 @@ static int imx1_read_bit(struct imx1_pinctrl *ipctl, unsigned int pin_id,
 	return !!(readl(reg) & BIT(offset));
 }
 
-static const inline struct imx1_pin_group *imx1_pinctrl_find_group_by_name(
+static inline const struct imx1_pin_group *imx1_pinctrl_find_group_by_name(
 				const struct imx1_pinctrl_soc_info *info,
 				const char *name)
 {
diff --git a/drivers/pinctrl/pinctrl-at91.c b/drivers/pinctrl/pinctrl-at91.c
index b7c0d6f7c046..2ce429cf41e6 100644
--- a/drivers/pinctrl/pinctrl-at91.c
+++ b/drivers/pinctrl/pinctrl-at91.c
@@ -189,7 +189,7 @@ struct at91_pinctrl {
 	struct at91_pinctrl_mux_ops *ops;
 };
 
-static const inline struct at91_pin_group *at91_pinctrl_find_group_by_name(
+static inline const struct at91_pin_group *at91_pinctrl_find_group_by_name(
 				const struct at91_pinctrl *info,
 				const char *name)
 {
diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c
index a91026e8cd7c..a2337b7dfc41 100644
--- a/drivers/pinctrl/pinctrl-rockchip.c
+++ b/drivers/pinctrl/pinctrl-rockchip.c
@@ -360,7 +360,7 @@ static struct regmap_config rockchip_regmap_config = {
 	.reg_stride = 4,
 };
 
-static const inline struct rockchip_pin_group *pinctrl_name_to_group(
+static inline const struct rockchip_pin_group *pinctrl_name_to_group(
 					const struct rockchip_pinctrl *info,
 					const char *name)
 {
diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
index d0ba968af5bb..0de1c67dfb94 100644
--- a/drivers/pinctrl/pinctrl-st.c
+++ b/drivers/pinctrl/pinctrl-st.c
@@ -844,7 +844,7 @@ static int st_pctl_get_group_pins(struct pinctrl_dev *pctldev,
 	return 0;
 }
 
-static const inline struct st_pctl_group *st_pctl_find_group_by_name(
+static inline const struct st_pctl_group *st_pctl_find_group_by_name(
 	const struct st_pinctrl *info, const char *name)
 {
 	int i;
-- 
2.7.0

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

* [PATCH 2/2] pinctrl: max77620: select PINMUX
  2016-06-13 15:18 [PATCH 1/2] pinctrl: fix incorrect inline keyword in multiple drivers Arnd Bergmann
@ 2016-06-13 15:18 ` Arnd Bergmann
  2016-06-14  6:56   ` Linus Walleij
  2016-06-14  6:55 ` [PATCH 1/2] pinctrl: fix incorrect inline keyword in multiple drivers Linus Walleij
  1 sibling, 1 reply; 4+ messages in thread
From: Arnd Bergmann @ 2016-06-13 15:18 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Arnd Bergmann, Laxman Dewangan, linux-gpio, linux-kernel

The recently added max77620 driver fails to build when CONFIG_PINMUX
is not set:

pinctrl/pinctrl-max77620.c:272:21: error: variable 'max77620_pinmux_ops' has initializer but incomplete type
 static const struct pinmux_ops max77620_pinmux_ops = {
                     ^~~~~~~~~~
pinctrl/pinctrl-max77620.c:273:2: error: unknown field 'get_functions_count' specified in initializer

This adds the Kconfig 'select' statement that was clearly meant
to be there and is used in all other pinmux drivers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/pinctrl/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pinctrl/Kconfig b/drivers/pinctrl/Kconfig
index ea25eeeceef1..78c9ed277a77 100644
--- a/drivers/pinctrl/Kconfig
+++ b/drivers/pinctrl/Kconfig
@@ -210,6 +210,7 @@ config PINCTRL_COH901
 config PINCTRL_MAX77620
 	tristate "MAX77620/MAX20024 Pincontrol support"
 	depends on MFD_MAX77620
+	select PINMUX
 	select GENERIC_PINCONF
 	help
 	  Say Yes here to enable Pin control support for Maxim PMIC MAX77620.
-- 
2.7.0

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

* Re: [PATCH 1/2] pinctrl: fix incorrect inline keyword in multiple drivers
  2016-06-13 15:18 [PATCH 1/2] pinctrl: fix incorrect inline keyword in multiple drivers Arnd Bergmann
  2016-06-13 15:18 ` [PATCH 2/2] pinctrl: max77620: select PINMUX Arnd Bergmann
@ 2016-06-14  6:55 ` Linus Walleij
  1 sibling, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2016-06-14  6:55 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Jean-Christophe Plagniol-Villard, Heiko Stuebner,
	Srinivas Kandagatla, Maxime Coquelin, Patrice Chotard, Shawn Guo,
	Adrian Alonso, Thomas Gleixner, linux-gpio, linux-kernel,
	linux-arm-kernel, open list:ARM/Rockchip SoC...,
	open list:ARM/STI ARCHITECTURE

On Mon, Jun 13, 2016 at 5:18 PM, Arnd Bergmann <arnd@arndb.de> wrote:

> When building with 'make W=1', we get harmless warnings about
> five drivers in drivers/pinctrl, which all contain a copy of
> the same line:
>
> drivers/pinctrl/freescale/pinctrl-imx1-core.c:160:1: error: 'inline' is not at beginning of declaration [-Werror=old-style-declaration]
>
> This replaces the somewhat nonstandard 'static const inline'
> with 'static inline const', which has the same meaning but
> does not cause this warning.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH 2/2] pinctrl: max77620: select PINMUX
  2016-06-13 15:18 ` [PATCH 2/2] pinctrl: max77620: select PINMUX Arnd Bergmann
@ 2016-06-14  6:56   ` Linus Walleij
  0 siblings, 0 replies; 4+ messages in thread
From: Linus Walleij @ 2016-06-14  6:56 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Laxman Dewangan, linux-gpio, linux-kernel

On Mon, Jun 13, 2016 at 5:18 PM, Arnd Bergmann <arnd@arndb.de> wrote:

> The recently added max77620 driver fails to build when CONFIG_PINMUX
> is not set:
>
> pinctrl/pinctrl-max77620.c:272:21: error: variable 'max77620_pinmux_ops' has initializer but incomplete type
>  static const struct pinmux_ops max77620_pinmux_ops = {
>                      ^~~~~~~~~~
> pinctrl/pinctrl-max77620.c:273:2: error: unknown field 'get_functions_count' specified in initializer
>
> This adds the Kconfig 'select' statement that was clearly meant
> to be there and is used in all other pinmux drivers.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Patch applied.

Yours,
Linus Walleij

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

end of thread, other threads:[~2016-06-14  6:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-13 15:18 [PATCH 1/2] pinctrl: fix incorrect inline keyword in multiple drivers Arnd Bergmann
2016-06-13 15:18 ` [PATCH 2/2] pinctrl: max77620: select PINMUX Arnd Bergmann
2016-06-14  6:56   ` Linus Walleij
2016-06-14  6:55 ` [PATCH 1/2] pinctrl: fix incorrect inline keyword in multiple drivers 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).