[PATCH] pinctrl: coh901: fix initconst annotation

Subsystems: pin control subsystem, the rest

STALE3819d

2 messages, 2 authors, 2016-02-15 · open the first message on its own page

[PATCH] pinctrl: coh901: fix initconst annotation

From: Arnd Bergmann <arnd@arndb.de>
Date: 2016-02-08 14:30:34

Clang correctly points out that the section attribute for u300_gpio_confdata
is in the wrong place:

drivers/pinctrl/pinctrl-coh901.c:130:37: error: '__section__' attribute only applies to functions and global variables

This moves it from the type name to the variable, so it actually gets
discarded.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/pinctrl/pinctrl-coh901.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c
index cf7788df0f95..741b39eaeb8b 100644
--- a/drivers/pinctrl/pinctrl-coh901.c
+++ b/drivers/pinctrl/pinctrl-coh901.c
@@ -127,7 +127,7 @@ struct u300_gpio_confdata {
 }
 
 /* Initial configuration */
-static const struct __initconst u300_gpio_confdata
+static const struct u300_gpio_confdata __initconst
 bs335_gpio_config[U300_GPIO_NUM_PORTS][U300_GPIO_PINS_PER_PORT] = {
 	/* Port 0, pins 0-7 */
 	{
-- 
2.7.0

Re: [PATCH] pinctrl: coh901: fix initconst annotation

From: Linus Walleij <hidden>
Date: 2016-02-15 19:41:25

On Mon, Feb 8, 2016 at 3:29 PM, Arnd Bergmann [off-list ref] wrote:
Clang correctly points out that the section attribute for u300_gpio_confdata
is in the wrong place:

drivers/pinctrl/pinctrl-coh901.c:130:37: error: '__section__' attribute only applies to functions and global variables

This moves it from the type name to the variable, so it actually gets
discarded.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Patch applied.

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help