2017-12-26 06:33:27

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 01/11 v2] MIPS: Alchemy: constify gpio_led

gpio_led are not supposed to change at runtime.
struct gpio_led_platform_data working with const gpio_led
provided by <linux/leds.h>. So mark the non-const structs
as const.

Signed-off-by: Arvind Yadav <[email protected]>
---
changes in v2:
The GPIO LED driver can be built as a module, it can
be loaded after the init sections have gone away.
So removed '__initconst'.

arch/mips/alchemy/board-gpr.c | 2 +-
arch/mips/alchemy/board-mtx1.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/alchemy/board-gpr.c b/arch/mips/alchemy/board-gpr.c
index 328d697..4e79dbd 100644
--- a/arch/mips/alchemy/board-gpr.c
+++ b/arch/mips/alchemy/board-gpr.c
@@ -190,7 +190,7 @@ static struct platform_device gpr_mtd_device = {
/*
* LEDs
*/
-static struct gpio_led gpr_gpio_leds[] = {
+static const struct gpio_led gpr_gpio_leds[] = {
{ /* green */
.name = "gpr:green",
.gpio = 4,
diff --git a/arch/mips/alchemy/board-mtx1.c b/arch/mips/alchemy/board-mtx1.c
index 85bb756..aab55aa 100644
--- a/arch/mips/alchemy/board-mtx1.c
+++ b/arch/mips/alchemy/board-mtx1.c
@@ -145,7 +145,7 @@ static struct platform_device mtx1_wdt = {
.resource = mtx1_wdt_res,
};

-static struct gpio_led default_leds[] = {
+static const struct gpio_led default_leds[] = {
{
.name = "mtx1:green",
.gpio = 211,
--
2.7.4


2017-12-26 06:33:35

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 02/11 v2] MIPS: AR7: constify gpio_led

gpio_led are not supposed to change at runtime.
struct gpio_led_platform_data working with const gpio_led
provided by <linux/leds.h>. So mark the non-const structs
as const.

Signed-off-by: Arvind Yadav <[email protected]>
---
changes in v2:
The GPIO LED driver can be built as a module, it can
be loaded after the init sections have gone away.
So removed '__initconst'.

arch/mips/ar7/platform.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/mips/ar7/platform.c b/arch/mips/ar7/platform.c
index 4674f1e..4694273 100644
--- a/arch/mips/ar7/platform.c
+++ b/arch/mips/ar7/platform.c
@@ -346,7 +346,7 @@ static struct platform_device ar7_udc = {
/*****************************************************************************
* LEDs
****************************************************************************/
-static struct gpio_led default_leds[] = {
+static const struct gpio_led default_leds[] = {
{
.name = "status",
.gpio = 8,
@@ -354,12 +354,12 @@ static struct gpio_led default_leds[] = {
},
};

-static struct gpio_led titan_leds[] = {
+static const struct gpio_led titan_leds[] = {
{ .name = "status", .gpio = 8, .active_low = 1, },
{ .name = "wifi", .gpio = 13, .active_low = 1, },
};

-static struct gpio_led dsl502t_leds[] = {
+static const struct gpio_led dsl502t_leds[] = {
{
.name = "status",
.gpio = 9,
@@ -377,7 +377,7 @@ static struct gpio_led dsl502t_leds[] = {
},
};

-static struct gpio_led dg834g_leds[] = {
+static const struct gpio_led dg834g_leds[] = {
{
.name = "ppp",
.gpio = 6,
@@ -406,7 +406,7 @@ static struct gpio_led dg834g_leds[] = {
},
};

-static struct gpio_led fb_sl_leds[] = {
+static const struct gpio_led fb_sl_leds[] = {
{
.name = "1",
.gpio = 7,
@@ -433,7 +433,7 @@ static struct gpio_led fb_sl_leds[] = {
},
};

-static struct gpio_led fb_fon_leds[] = {
+static const struct gpio_led fb_fon_leds[] = {
{
.name = "1",
.gpio = 8,
@@ -459,7 +459,7 @@ static struct gpio_led fb_fon_leds[] = {
},
};

-static struct gpio_led gt701_leds[] = {
+static const struct gpio_led gt701_leds[] = {
{
.name = "inet:green",
.gpio = 13,
--
2.7.4

2017-12-26 06:33:43

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 03/11 v2] MIPS: TXX9: constify gpio_led

gpio_led are not supposed to change at runtime.
struct gpio_led_platform_data working with const gpio_led
provided by <linux/leds.h>. So mark the non-const structs
as const.

Signed-off-by: Arvind Yadav <[email protected]>
---
changes in v2:
The GPIO LED driver can be built as a module, it can
be loaded after the init sections have gone away.
So removed '__initconst'.

arch/mips/txx9/rbtx4927/setup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/txx9/rbtx4927/setup.c b/arch/mips/txx9/rbtx4927/setup.c
index f5b367e..31955c1 100644
--- a/arch/mips/txx9/rbtx4927/setup.c
+++ b/arch/mips/txx9/rbtx4927/setup.c
@@ -319,7 +319,7 @@ static void __init rbtx4927_mtd_init(void)

static void __init rbtx4927_gpioled_init(void)
{
- static struct gpio_led leds[] = {
+ static const struct gpio_led leds[] = {
{ .name = "gpioled:green:0", .gpio = 0, .active_low = 1, },
{ .name = "gpioled:green:1", .gpio = 1, .active_low = 1, },
};
--
2.7.4

2017-12-26 06:35:07

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 04/11 v2] x86: geode: constify gpio_led

gpio_led are not supposed to change at runtime.
struct gpio_led_platform_data working with const gpio_led
provided by <linux/leds.h>. So mark the non-const structs
as const.

Signed-off-by: Arvind Yadav <[email protected]>
---
changes in v2:
The GPIO LED driver can be built as a module, it can
be loaded after the init sections have gone away.
So removed '__initconst'.

arch/x86/platform/geode/alix.c | 2 +-
arch/x86/platform/geode/geos.c | 2 +-
arch/x86/platform/geode/net5501.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/platform/geode/alix.c b/arch/x86/platform/geode/alix.c
index 1865c19..f447ed7 100644
--- a/arch/x86/platform/geode/alix.c
+++ b/arch/x86/platform/geode/alix.c
@@ -71,7 +71,7 @@ static struct platform_device alix_buttons_dev = {
}
};

-static struct gpio_led alix_leds[] = {
+static const struct gpio_led alix_leds[] = {
{
.name = "alix:1",
.gpio = 6,
diff --git a/arch/x86/platform/geode/geos.c b/arch/x86/platform/geode/geos.c
index 4fcdb91..146697b 100644
--- a/arch/x86/platform/geode/geos.c
+++ b/arch/x86/platform/geode/geos.c
@@ -54,7 +54,7 @@ static struct platform_device geos_buttons_dev = {
}
};

-static struct gpio_led geos_leds[] = {
+static const struct gpio_led geos_leds[] = {
{
.name = "geos:1",
.gpio = 6,
diff --git a/arch/x86/platform/geode/net5501.c b/arch/x86/platform/geode/net5501.c
index a2f6b98..e5e1a64 100644
--- a/arch/x86/platform/geode/net5501.c
+++ b/arch/x86/platform/geode/net5501.c
@@ -57,7 +57,7 @@ static struct platform_device net5501_buttons_dev = {
}
};

-static struct gpio_led net5501_leds[] = {
+static const struct gpio_led net5501_leds[] = {
{
.name = "net5501:1",
.gpio = 6,
--
2.7.4

2017-12-26 06:35:56

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 05/11 v2] sh: mach-rsk: rsk7203: constify gpio_led

gpio_led are not supposed to change at runtime.
struct gpio_led_platform_data working with const gpio_led
provided by <linux/leds.h>. So mark the non-const structs
as const.

Signed-off-by: Arvind Yadav <[email protected]>
---
changes in v2:
The GPIO LED driver can be built as a module, it can
be loaded after the init sections have gone away.
So removed '__initconst'.

arch/sh/boards/mach-rsk/devices-rsk7203.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sh/boards/mach-rsk/devices-rsk7203.c b/arch/sh/boards/mach-rsk/devices-rsk7203.c
index a8089f7..6676c0e 100644
--- a/arch/sh/boards/mach-rsk/devices-rsk7203.c
+++ b/arch/sh/boards/mach-rsk/devices-rsk7203.c
@@ -50,7 +50,7 @@ static struct platform_device smsc911x_device = {
},
};

-static struct gpio_led rsk7203_gpio_leds[] = {
+static const struct gpio_led rsk7203_gpio_leds[] = {
{
.name = "green",
.gpio = GPIO_PE10,
--
2.7.4

2017-12-26 06:37:32

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 06/11 v2] ARM: davinci: constify gpio_led

gpio_led are not supposed to change at runtime.
struct gpio_led_platform_data working with const gpio_led
provided by <linux/leds.h>. So mark the non-const structs
as const.

Signed-off-by: Arvind Yadav <[email protected]>
---
changes in v2:
The GPIO LED driver can be built as a module, it can
be loaded after the init sections have gone away.
So removed '__initconst'.

arch/arm/mach-davinci/board-neuros-osd2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/mach-davinci/board-neuros-osd2.c b/arch/arm/mach-davinci/board-neuros-osd2.c
index 0c02aaa..4da210a 100644
--- a/arch/arm/mach-davinci/board-neuros-osd2.c
+++ b/arch/arm/mach-davinci/board-neuros-osd2.c
@@ -128,7 +128,7 @@ static struct platform_device davinci_fb_device = {
.num_resources = 0,
};

-static struct gpio_led ntosd2_leds[] = {
+static const struct gpio_led ntosd2_leds[] = {
{ .name = "led1_green", .gpio = GPIO(10), },
{ .name = "led1_red", .gpio = GPIO(11), },
{ .name = "led2_green", .gpio = GPIO(12), },
--
2.7.4

2017-12-26 06:37:41

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 07/11 v2] ARM: ixp4xx: constify gpio_led

gpio_led are not supposed to change at runtime.
struct gpio_led_platform_data working with const gpio_led
provided by <linux/leds.h>. So mark the non-const structs
as const.

Signed-off-by: Arvind Yadav <[email protected]>
---
changes in v2:
The GPIO LED driver can be built as a module, it can
be loaded after the init sections have gone away.
So removed '__initconst'.

arch/arm/mach-ixp4xx/dsmg600-setup.c | 2 +-
arch/arm/mach-ixp4xx/nas100d-setup.c | 2 +-
arch/arm/mach-ixp4xx/omixp-setup.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-ixp4xx/dsmg600-setup.c b/arch/arm/mach-ixp4xx/dsmg600-setup.c
index 0f5c999..77d894d 100644
--- a/arch/arm/mach-ixp4xx/dsmg600-setup.c
+++ b/arch/arm/mach-ixp4xx/dsmg600-setup.c
@@ -93,7 +93,7 @@ static struct i2c_board_info __initdata dsmg600_i2c_board_info [] = {
},
};

-static struct gpio_led dsmg600_led_pins[] = {
+static const struct gpio_led dsmg600_led_pins[] = {
{
.name = "dsmg600:green:power",
.gpio = DSMG600_LED_PWR_GPIO,
diff --git a/arch/arm/mach-ixp4xx/nas100d-setup.c b/arch/arm/mach-ixp4xx/nas100d-setup.c
index 76dfff0..8d6bab9 100644
--- a/arch/arm/mach-ixp4xx/nas100d-setup.c
+++ b/arch/arm/mach-ixp4xx/nas100d-setup.c
@@ -72,7 +72,7 @@ static struct i2c_board_info __initdata nas100d_i2c_board_info [] = {
},
};

-static struct gpio_led nas100d_led_pins[] = {
+static const struct gpio_led nas100d_led_pins[] = {
{
.name = "nas100d:green:wlan",
.gpio = NAS100D_LED_WLAN_GPIO,
diff --git a/arch/arm/mach-ixp4xx/omixp-setup.c b/arch/arm/mach-ixp4xx/omixp-setup.c
index 2d494b4..42c83a6 100644
--- a/arch/arm/mach-ixp4xx/omixp-setup.c
+++ b/arch/arm/mach-ixp4xx/omixp-setup.c
@@ -152,7 +152,7 @@ static struct platform_device omixp_uart = {
.resource = omixp_uart_resources,
};

-static struct gpio_led mic256_led_pins[] = {
+static const struct gpio_led mic256_led_pins[] = {
{
.name = "LED-A",
.gpio = 7,
--
2.7.4

2017-12-26 06:37:47

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 08/11 v2] ARM: OMAP1: constify gpio_led

gpio_led are not supposed to change at runtime.
struct gpio_led_platform_data working with const gpio_led
provided by <linux/leds.h>. So mark the non-const structs
as const.

Signed-off-by: Arvind Yadav <[email protected]>
---
changes in v2:
The GPIO LED driver can be built as a module, it can
be loaded after the init sections have gone away.
So removed '__initconst'.

arch/arm/mach-omap1/board-h2.c | 2 +-
arch/arm/mach-omap1/board-h3.c | 2 +-
arch/arm/mach-omap1/board-htcherald.c | 2 +-
arch/arm/mach-omap1/board-osk.c | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
index ab51f85..9aeb8ad 100644
--- a/arch/arm/mach-omap1/board-h2.c
+++ b/arch/arm/mach-omap1/board-h2.c
@@ -274,7 +274,7 @@ static struct platform_device h2_kp_device = {
.resource = h2_kp_resources,
};

-static struct gpio_led h2_gpio_led_pins[] = {
+static const struct gpio_led h2_gpio_led_pins[] = {
{
.name = "h2:red",
.default_trigger = "heartbeat",
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
index ad339f5..2edcd63 100644
--- a/arch/arm/mach-omap1/board-h3.c
+++ b/arch/arm/mach-omap1/board-h3.c
@@ -326,7 +326,7 @@ static struct spi_board_info h3_spi_board_info[] __initdata = {
},
};

-static struct gpio_led h3_gpio_led_pins[] = {
+static const struct gpio_led h3_gpio_led_pins[] = {
{
.name = "h3:red",
.default_trigger = "heartbeat",
diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c
index 67d4669..e6a79fd 100644
--- a/arch/arm/mach-omap1/board-htcherald.c
+++ b/arch/arm/mach-omap1/board-htcherald.c
@@ -292,7 +292,7 @@ static struct platform_device herald_gpiokeys_device = {
};

/* LEDs for the Herald. These connect to the HTCPLD GPIO device. */
-static struct gpio_led gpio_leds[] = {
+static const struct gpio_led gpio_leds[] = {
{"dpad", NULL, HTCPLD_GPIO_LED_DPAD, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
{"kbd", NULL, HTCPLD_GPIO_LED_KBD, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
{"vibrate", NULL, HTCPLD_GPIO_LED_VIBRATE, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
index c66372e..e2277b5 100644
--- a/arch/arm/mach-omap1/board-osk.c
+++ b/arch/arm/mach-omap1/board-osk.c
@@ -167,7 +167,7 @@ static struct platform_device *osk5912_devices[] __initdata = {
&osk5912_cf_device,
};

-static struct gpio_led tps_leds[] = {
+static const struct gpio_led tps_leds[] = {
/* NOTE: D9 and D2 have hardware blink support.
* Also, D9 requires non-battery power.
*/
@@ -385,7 +385,7 @@ static struct platform_device osk5912_lcd_device = {
.id = -1,
};

-static struct gpio_led mistral_gpio_led_pins[] = {
+static const struct gpio_led mistral_gpio_led_pins[] = {
{
.name = "mistral:red",
.default_trigger = "heartbeat",
--
2.7.4

2017-12-26 06:37:54

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 09/11 v2] ARM: orion5x: constify gpio_led

gpio_led are not supposed to change at runtime.
struct gpio_led_platform_data working with const gpio_led
provided by <linux/leds.h>. So mark the non-const structs
as const.

Signed-off-by: Arvind Yadav <[email protected]>
---
changes in v2:
The GPIO LED driver can be built as a module, it can
be loaded after the init sections have gone away.
So removed '__initconst'.

arch/arm/mach-orion5x/board-d2net.c | 2 +-
arch/arm/mach-orion5x/dns323-setup.c | 2 +-
arch/arm/mach-orion5x/ls_hgl-setup.c | 2 +-
arch/arm/mach-orion5x/mv2120-setup.c | 2 +-
arch/arm/mach-orion5x/net2big-setup.c | 2 +-
arch/arm/mach-orion5x/rd88f5182-setup.c | 2 +-
arch/arm/mach-orion5x/ts409-setup.c | 2 +-
arch/arm/mach-orion5x/wrt350n-v2-setup.c | 2 +-
8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-orion5x/board-d2net.c b/arch/arm/mach-orion5x/board-d2net.c
index a89376a..55d6562 100644
--- a/arch/arm/mach-orion5x/board-d2net.c
+++ b/arch/arm/mach-orion5x/board-d2net.c
@@ -54,7 +54,7 @@
#define D2NET_GPIO_BLUE_LED_BLINK_CTRL 16
#define D2NET_GPIO_BLUE_LED_OFF 23

-static struct gpio_led d2net_leds[] = {
+static const struct gpio_led d2net_leds[] = {
{
.name = "d2net:blue:sata",
.default_trigger = "default-on",
diff --git a/arch/arm/mach-orion5x/dns323-setup.c b/arch/arm/mach-orion5x/dns323-setup.c
index cd483bf..6aeab1d 100644
--- a/arch/arm/mach-orion5x/dns323-setup.c
+++ b/arch/arm/mach-orion5x/dns323-setup.c
@@ -204,7 +204,7 @@ static int __init dns323_read_mac_addr(void)
* GPIO LEDs (simple - doesn't use hardware blinking support)
*/

-static struct gpio_led dns323ab_leds[] = {
+static const struct gpio_led dns323ab_leds[] = {
{
.name = "power:blue",
.gpio = DNS323_GPIO_LED_POWER2,
diff --git a/arch/arm/mach-orion5x/ls_hgl-setup.c b/arch/arm/mach-orion5x/ls_hgl-setup.c
index 47ba6e0..c394281 100644
--- a/arch/arm/mach-orion5x/ls_hgl-setup.c
+++ b/arch/arm/mach-orion5x/ls_hgl-setup.c
@@ -86,7 +86,7 @@ static struct i2c_board_info __initdata ls_hgl_i2c_rtc = {
#define LS_HGL_GPIO_LED_PWR 0


-static struct gpio_led ls_hgl_led_pins[] = {
+static const struct gpio_led ls_hgl_led_pins[] = {
{
.name = "alarm:red",
.gpio = LS_HGL_GPIO_LED_ALARM,
diff --git a/arch/arm/mach-orion5x/mv2120-setup.c b/arch/arm/mach-orion5x/mv2120-setup.c
index 2bf8ec7..724c08a 100644
--- a/arch/arm/mach-orion5x/mv2120-setup.c
+++ b/arch/arm/mach-orion5x/mv2120-setup.c
@@ -136,7 +136,7 @@ static struct i2c_board_info __initdata mv2120_i2c_rtc = {
.irq = 0,
};

-static struct gpio_led mv2120_led_pins[] = {
+static const struct gpio_led mv2120_led_pins[] = {
{
.name = "mv2120:blue:health",
.gpio = 0,
diff --git a/arch/arm/mach-orion5x/net2big-setup.c b/arch/arm/mach-orion5x/net2big-setup.c
index bf6be4c..7d59888 100644
--- a/arch/arm/mach-orion5x/net2big-setup.c
+++ b/arch/arm/mach-orion5x/net2big-setup.c
@@ -214,7 +214,7 @@ static void __init net2big_sata_power_init(void)
#define NET2BIG_GPIO_SATA0_BLUE_LED 17
#define NET2BIG_GPIO_SATA1_BLUE_LED 13

-static struct gpio_led net2big_leds[] = {
+static const struct gpio_led net2big_leds[] = {
{
.name = "net2big:red:power",
.gpio = NET2BIG_GPIO_PWR_RED_LED,
diff --git a/arch/arm/mach-orion5x/rd88f5182-setup.c b/arch/arm/mach-orion5x/rd88f5182-setup.c
index fe3e67c..e2f280d 100644
--- a/arch/arm/mach-orion5x/rd88f5182-setup.c
+++ b/arch/arm/mach-orion5x/rd88f5182-setup.c
@@ -83,7 +83,7 @@ static struct platform_device rd88f5182_nor_flash = {

#define RD88F5182_GPIO_LED 0

-static struct gpio_led rd88f5182_gpio_led_pins[] = {
+static const struct gpio_led rd88f5182_gpio_led_pins[] = {
{
.name = "rd88f5182:cpu",
.default_trigger = "cpu0",
diff --git a/arch/arm/mach-orion5x/ts409-setup.c b/arch/arm/mach-orion5x/ts409-setup.c
index a77613b..a31f6848 100644
--- a/arch/arm/mach-orion5x/ts409-setup.c
+++ b/arch/arm/mach-orion5x/ts409-setup.c
@@ -169,7 +169,7 @@ static struct i2c_board_info __initdata qnap_ts409_i2c_rtc = {
* LEDs attached to GPIO
****************************************************************************/

-static struct gpio_led ts409_led_pins[] = {
+static const struct gpio_led ts409_led_pins[] = {
{
.name = "ts409:red:sata1",
.gpio = 4,
diff --git a/arch/arm/mach-orion5x/wrt350n-v2-setup.c b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
index 9250bb2..5493d73 100644
--- a/arch/arm/mach-orion5x/wrt350n-v2-setup.c
+++ b/arch/arm/mach-orion5x/wrt350n-v2-setup.c
@@ -29,7 +29,7 @@
/*
* LEDs attached to GPIO
*/
-static struct gpio_led wrt350n_v2_led_pins[] = {
+static const struct gpio_led wrt350n_v2_led_pins[] = {
{
.name = "wrt350nv2:green:power",
.gpio = 0,
--
2.7.4

2017-12-26 06:38:02

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 10/11 v2] ARM: s3c24xx/s3c64xx: constify gpio_led

Signed-off-by: Arvind Yadav <[email protected]>
---
changes in v2:
The GPIO LED driver can be built as a module, it can
be loaded after the init sections have gone away.
So removed '__initconst'.

arch/arm/mach-s3c24xx/mach-h1940.c | 2 +-
arch/arm/mach-s3c24xx/mach-rx1950.c | 2 +-
arch/arm/mach-s3c64xx/mach-hmt.c | 2 +-
arch/arm/mach-s3c64xx/mach-smartq5.c | 2 +-
arch/arm/mach-s3c64xx/mach-smartq7.c | 2 +-
arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
index 7ed7861..6a3e0e6 100644
--- a/arch/arm/mach-s3c24xx/mach-h1940.c
+++ b/arch/arm/mach-s3c24xx/mach-h1940.c
@@ -413,7 +413,7 @@ int h1940_led_blink_set(struct gpio_desc *desc, int state,
}
EXPORT_SYMBOL(h1940_led_blink_set);

-static struct gpio_led h1940_leds_desc[] = {
+static const struct gpio_led h1940_leds_desc[] = {
{
.name = "Green",
.default_trigger = "main-battery-full",
diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
index e86ad6a..97bb6a5 100644
--- a/arch/arm/mach-s3c24xx/mach-rx1950.c
+++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
@@ -295,7 +295,7 @@ static int rx1950_led_blink_set(struct gpio_desc *desc, int state,
return 0;
}

-static struct gpio_led rx1950_leds_desc[] = {
+static const struct gpio_led rx1950_leds_desc[] = {
{
.name = "Green",
.default_trigger = "main-battery-full",
diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c
index 59b5531..f8d644f 100644
--- a/arch/arm/mach-s3c64xx/mach-hmt.c
+++ b/arch/arm/mach-s3c64xx/mach-hmt.c
@@ -207,7 +207,7 @@ static struct s3c2410_platform_nand hmt_nand_info = {
.ecc_mode = NAND_ECC_SOFT,
};

-static struct gpio_led hmt_leds[] = {
+static const struct gpio_led hmt_leds[] = {
{ /* left function keys */
.name = "left:blue",
.gpio = S3C64XX_GPO(12),
diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c
index 0972b6c..5a7cd8f 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq5.c
+++ b/arch/arm/mach-s3c64xx/mach-smartq5.c
@@ -35,7 +35,7 @@
#include "common.h"
#include "mach-smartq.h"

-static struct gpio_led smartq5_leds[] = {
+static const struct gpio_led smartq5_leds[] = {
{
.name = "smartq5:green",
.active_low = 1,
diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c
index 51ac1c6..9de9fc2 100644
--- a/arch/arm/mach-s3c64xx/mach-smartq7.c
+++ b/arch/arm/mach-s3c64xx/mach-smartq7.c
@@ -35,7 +35,7 @@
#include "common.h"
#include "mach-smartq.h"

-static struct gpio_led smartq7_leds[] = {
+static const struct gpio_led smartq7_leds[] = {
{
.name = "smartq7:red",
.active_low = 1,
diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
index 92ec8c3..be9d98f 100644
--- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
+++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
@@ -497,7 +497,7 @@ static struct wm8350_platform_data __initdata smdk6410_wm8350_pdata = {
#endif

#ifdef CONFIG_SMDK6410_WM1192_EV1
-static struct gpio_led wm1192_pmic_leds[] = {
+static const struct gpio_led wm1192_pmic_leds[] = {
{
.name = "PMIC:red:power",
.gpio = GPIO_BOARD_START + 3,
--
2.7.4

2017-12-26 06:38:10

by Arvind Yadav

[permalink] [raw]
Subject: [PATCH 11/11 v2] ARM: pxa: constify gpio_led

gpio_led are not supposed to change at runtime.
struct gpio_led_platform_data working with const gpio_led
provided by <linux/leds.h>. So mark the non-const structs
as const.

Signed-off-by: Arvind Yadav <[email protected]>
---
changes in v2:
The GPIO LED driver can be built as a module, it can
be loaded after the init sections have gone away.
So removed '__initconst'. Resolve auto build test ERROR.

arch/arm/mach-pxa/balloon3.c | 4 ++--
arch/arm/mach-pxa/corgi.c | 2 +-
arch/arm/mach-pxa/csb701.c | 2 +-
arch/arm/mach-pxa/magician.c | 2 +-
arch/arm/mach-pxa/mioa701.c | 2 +-
arch/arm/mach-pxa/palmld.c | 2 +-
arch/arm/mach-pxa/palmz72.c | 2 +-
arch/arm/mach-pxa/pcm027.c | 2 +-
arch/arm/mach-pxa/raumfeld.c | 4 ++--
arch/arm/mach-pxa/spitz.c | 2 +-
arch/arm/mach-pxa/stargate2.c | 2 +-
arch/arm/mach-pxa/tosa.c | 2 +-
arch/arm/mach-pxa/trizeps4.c | 2 +-
arch/arm/mach-pxa/zeus.c | 2 +-
14 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
index d6d92f3..abcfb19 100644
--- a/arch/arm/mach-pxa/balloon3.c
+++ b/arch/arm/mach-pxa/balloon3.c
@@ -387,7 +387,7 @@ static unsigned long balloon3_led_pin_config[] __initdata = {
GPIO10_GPIO, /* Heartbeat LED */
};

-struct gpio_led balloon3_gpio_leds[] = {
+const struct gpio_led balloon3_gpio_leds[] = {
{
.name = "balloon3:green:idle",
.default_trigger = "heartbeat",
@@ -414,7 +414,7 @@ static struct platform_device balloon3_leds = {
}
};

-struct gpio_led balloon3_pcf_gpio_leds[] = {
+const struct gpio_led balloon3_pcf_gpio_leds[] = {
{
.name = "balloon3:green:led0",
.gpio = BALLOON3_PCF_GPIO_LED0,
diff --git a/arch/arm/mach-pxa/corgi.c b/arch/arm/mach-pxa/corgi.c
index 7270f0db..6d6ded0 100644
--- a/arch/arm/mach-pxa/corgi.c
+++ b/arch/arm/mach-pxa/corgi.c
@@ -450,7 +450,7 @@ static struct platform_device corgi_gpio_keys_device = {
/*
* Corgi LEDs
*/
-static struct gpio_led corgi_gpio_leds[] = {
+static const struct gpio_led corgi_gpio_leds[] = {
{
.name = "corgi:amber:charge",
.default_trigger = "sharpsl-charge",
diff --git a/arch/arm/mach-pxa/csb701.c b/arch/arm/mach-pxa/csb701.c
index 527c9fd..b062b50 100644
--- a/arch/arm/mach-pxa/csb701.c
+++ b/arch/arm/mach-pxa/csb701.c
@@ -24,7 +24,7 @@ static struct gpio_keys_platform_data csb701_gpio_keys_data = {
.nbuttons = ARRAY_SIZE(csb701_buttons),
};

-static struct gpio_led csb701_leds[] = {
+static const struct gpio_led csb701_leds[] = {
{
.name = "csb701:yellow:heartbeat",
.default_trigger = "heartbeat",
diff --git a/arch/arm/mach-pxa/magician.c b/arch/arm/mach-pxa/magician.c
index 7f3566c..505c9cc 100644
--- a/arch/arm/mach-pxa/magician.c
+++ b/arch/arm/mach-pxa/magician.c
@@ -424,7 +424,7 @@ static struct platform_device backlight = {
* GPIO LEDs, Phone keys backlight, vibra
*/

-static struct gpio_led gpio_leds[] = {
+static const struct gpio_led gpio_leds[] = {
{
.name = "magician::vibra",
.default_trigger = "none",
diff --git a/arch/arm/mach-pxa/mioa701.c b/arch/arm/mach-pxa/mioa701.c
index 8a5d049..88115f0 100644
--- a/arch/arm/mach-pxa/mioa701.c
+++ b/arch/arm/mach-pxa/mioa701.c
@@ -274,7 +274,7 @@ static struct gpio_keys_platform_data mioa701_gpio_keys_data = {
*/
#define ONE_LED(_gpio, _name) \
{ .gpio = (_gpio), .name = (_name), .active_low = true }
-static struct gpio_led gpio_leds[] = {
+static const struct gpio_led gpio_leds[] = {
ONE_LED(GPIO10_LED_nCharging, "mioa701:charging"),
ONE_LED(GPIO97_LED_nBlue, "mioa701:blue"),
ONE_LED(GPIO98_LED_nOrange, "mioa701:orange"),
diff --git a/arch/arm/mach-pxa/palmld.c b/arch/arm/mach-pxa/palmld.c
index 980f284..eb5992b 100644
--- a/arch/arm/mach-pxa/palmld.c
+++ b/arch/arm/mach-pxa/palmld.c
@@ -246,7 +246,7 @@ static inline void palmld_keys_init(void) {}
* LEDs
******************************************************************************/
#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
-struct gpio_led gpio_leds[] = {
+const struct gpio_led gpio_leds[] = {
{
.name = "palmld:green:led",
.default_trigger = "none",
diff --git a/arch/arm/mach-pxa/palmz72.c b/arch/arm/mach-pxa/palmz72.c
index 5877e54..99c5bf2 100644
--- a/arch/arm/mach-pxa/palmz72.c
+++ b/arch/arm/mach-pxa/palmz72.c
@@ -182,7 +182,7 @@ static inline void palmz72_kpc_init(void) {}
* LEDs
******************************************************************************/
#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
-static struct gpio_led gpio_leds[] = {
+static const struct gpio_led gpio_leds[] = {
{
.name = "palmz72:green:led",
.default_trigger = "none",
diff --git a/arch/arm/mach-pxa/pcm027.c b/arch/arm/mach-pxa/pcm027.c
index ccca9f7..7dbea136 100644
--- a/arch/arm/mach-pxa/pcm027.c
+++ b/arch/arm/mach-pxa/pcm027.c
@@ -177,7 +177,7 @@ static struct platform_device pcm027_flash = {

#ifdef CONFIG_LEDS_GPIO

-static struct gpio_led pcm027_led[] = {
+static const struct gpio_led pcm027_led[] = {
{
.name = "led0:red", /* FIXME */
.gpio = PCM027_LED_CPU
diff --git a/arch/arm/mach-pxa/raumfeld.c b/arch/arm/mach-pxa/raumfeld.c
index 9d662fe..0d86dd6 100644
--- a/arch/arm/mach-pxa/raumfeld.c
+++ b/arch/arm/mach-pxa/raumfeld.c
@@ -468,7 +468,7 @@ static struct platform_device raumfeld_gpio_keys_device = {
* GPIO LEDs
*/

-static struct gpio_led raumfeld_leds[] = {
+static const struct gpio_led raumfeld_leds[] = {
{
.name = "raumfeld:1",
.gpio = GPIO_LED1,
@@ -558,7 +558,7 @@ static struct platform_device raumfeld_pwm_backlight_device = {
};

/* LT3593 controlled backlight */
-static struct gpio_led raumfeld_lt3593_led = {
+static const struct gpio_led raumfeld_lt3593_led = {
.name = "backlight",
.gpio = mfp_to_gpio(MFP_PIN_GPIO17),
.default_state = LEDS_GPIO_DEFSTATE_ON,
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 67d66c7..f7a23f4 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -456,7 +456,7 @@ static inline void spitz_keys_init(void) {}
* LEDs
******************************************************************************/
#if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
-static struct gpio_led spitz_gpio_leds[] = {
+static const struct gpio_led spitz_gpio_leds[] = {
{
.name = "spitz:amber:charge",
.default_trigger = "sharpsl-charge",
diff --git a/arch/arm/mach-pxa/stargate2.c b/arch/arm/mach-pxa/stargate2.c
index 6b7df6f..afa70f9 100644
--- a/arch/arm/mach-pxa/stargate2.c
+++ b/arch/arm/mach-pxa/stargate2.c
@@ -441,7 +441,7 @@ static struct pxamci_platform_data imote2_mci_platform_data = {
.gpio_power = -1,
};

-static struct gpio_led imote2_led_pins[] = {
+static const struct gpio_led imote2_led_pins[] = {
{
.name = "imote2:red",
.gpio = 103,
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c
index 6a386fd..c551b76 100644
--- a/arch/arm/mach-pxa/tosa.c
+++ b/arch/arm/mach-pxa/tosa.c
@@ -548,7 +548,7 @@ static struct platform_device tosa_gpio_keys_device = {
/*
* Tosa LEDs
*/
-static struct gpio_led tosa_gpio_leds[] = {
+static const struct gpio_led tosa_gpio_leds[] = {
{
.name = "tosa:amber:charge",
.default_trigger = "main-battery-charging",
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c
index 3dd13b4..a151c98 100644
--- a/arch/arm/mach-pxa/trizeps4.c
+++ b/arch/arm/mach-pxa/trizeps4.c
@@ -235,7 +235,7 @@ static struct platform_device dm9000_device = {
/****************************************************************************
* LED's on GPIO pins of PXA
****************************************************************************/
-static struct gpio_led trizeps4_led[] = {
+static const struct gpio_led trizeps4_led[] = {
#ifdef STATUS_LEDS_ON_STUART_PINS
{
.name = "led0:orange:heartbeat", /* */
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
index ecbcaee..40e036d 100644
--- a/arch/arm/mach-pxa/zeus.c
+++ b/arch/arm/mach-pxa/zeus.c
@@ -438,7 +438,7 @@ static struct spi_board_info zeus_spi_board_info[] = {
};

/* Leds */
-static struct gpio_led zeus_leds[] = {
+static const struct gpio_led zeus_leds[] = {
[0] = {
.name = "zeus:yellow:1",
.default_trigger = "heartbeat",
--
2.7.4

2017-12-26 17:42:16

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 10/11 v2] ARM: s3c24xx/s3c64xx: constify gpio_led

On Tue, Dec 26, 2017 at 7:37 AM, Arvind Yadav <[email protected]> wrote:
> Signed-off-by: Arvind Yadav <[email protected]>

Please write one-sentence long, easy to understand message describing
the change.

Best regards,
Krzysztof

> ---
> changes in v2:
> The GPIO LED driver can be built as a module, it can
> be loaded after the init sections have gone away.
> So removed '__initconst'.
>
> arch/arm/mach-s3c24xx/mach-h1940.c | 2 +-
> arch/arm/mach-s3c24xx/mach-rx1950.c | 2 +-
> arch/arm/mach-s3c64xx/mach-hmt.c | 2 +-
> arch/arm/mach-s3c64xx/mach-smartq5.c | 2 +-
> arch/arm/mach-s3c64xx/mach-smartq7.c | 2 +-
> arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +-
> 6 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
> index 7ed7861..6a3e0e6 100644
> --- a/arch/arm/mach-s3c24xx/mach-h1940.c
> +++ b/arch/arm/mach-s3c24xx/mach-h1940.c
> @@ -413,7 +413,7 @@ int h1940_led_blink_set(struct gpio_desc *desc, int state,
> }
> EXPORT_SYMBOL(h1940_led_blink_set);
>
> -static struct gpio_led h1940_leds_desc[] = {
> +static const struct gpio_led h1940_leds_desc[] = {
> {
> .name = "Green",
> .default_trigger = "main-battery-full",
> diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
> index e86ad6a..97bb6a5 100644
> --- a/arch/arm/mach-s3c24xx/mach-rx1950.c
> +++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
> @@ -295,7 +295,7 @@ static int rx1950_led_blink_set(struct gpio_desc *desc, int state,
> return 0;
> }
>
> -static struct gpio_led rx1950_leds_desc[] = {
> +static const struct gpio_led rx1950_leds_desc[] = {
> {
> .name = "Green",
> .default_trigger = "main-battery-full",
> diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c
> index 59b5531..f8d644f 100644
> --- a/arch/arm/mach-s3c64xx/mach-hmt.c
> +++ b/arch/arm/mach-s3c64xx/mach-hmt.c
> @@ -207,7 +207,7 @@ static struct s3c2410_platform_nand hmt_nand_info = {
> .ecc_mode = NAND_ECC_SOFT,
> };
>
> -static struct gpio_led hmt_leds[] = {
> +static const struct gpio_led hmt_leds[] = {
> { /* left function keys */
> .name = "left:blue",
> .gpio = S3C64XX_GPO(12),
> diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c
> index 0972b6c..5a7cd8f 100644
> --- a/arch/arm/mach-s3c64xx/mach-smartq5.c
> +++ b/arch/arm/mach-s3c64xx/mach-smartq5.c
> @@ -35,7 +35,7 @@
> #include "common.h"
> #include "mach-smartq.h"
>
> -static struct gpio_led smartq5_leds[] = {
> +static const struct gpio_led smartq5_leds[] = {
> {
> .name = "smartq5:green",
> .active_low = 1,
> diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c
> index 51ac1c6..9de9fc2 100644
> --- a/arch/arm/mach-s3c64xx/mach-smartq7.c
> +++ b/arch/arm/mach-s3c64xx/mach-smartq7.c
> @@ -35,7 +35,7 @@
> #include "common.h"
> #include "mach-smartq.h"
>
> -static struct gpio_led smartq7_leds[] = {
> +static const struct gpio_led smartq7_leds[] = {
> {
> .name = "smartq7:red",
> .active_low = 1,
> diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> index 92ec8c3..be9d98f 100644
> --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
> +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
> @@ -497,7 +497,7 @@ static struct wm8350_platform_data __initdata smdk6410_wm8350_pdata = {
> #endif
>
> #ifdef CONFIG_SMDK6410_WM1192_EV1
> -static struct gpio_led wm1192_pmic_leds[] = {
> +static const struct gpio_led wm1192_pmic_leds[] = {
> {
> .name = "PMIC:red:power",
> .gpio = GPIO_BOARD_START + 3,
> --
> 2.7.4
>

2017-12-26 18:41:06

by Arvind Yadav

[permalink] [raw]
Subject: Re: [PATCH 10/11 v2] ARM: s3c24xx/s3c64xx: constify gpio_led

Hi,

On Tuesday 26 December 2017 11:12 PM, Krzysztof Kozlowski wrote:
> On Tue, Dec 26, 2017 at 7:37 AM, Arvind Yadav <[email protected]> wrote:
>> Signed-off-by: Arvind Yadav <[email protected]>
> Please write one-sentence long, easy to understand message describing
> the change.
>
> Best regards,
> Krzysztof
Thanks for review comment. I will add.
>
>> ---
>> changes in v2:
>> The GPIO LED driver can be built as a module, it can
>> be loaded after the init sections have gone away.
>> So removed '__initconst'.
>>
>> arch/arm/mach-s3c24xx/mach-h1940.c | 2 +-
>> arch/arm/mach-s3c24xx/mach-rx1950.c | 2 +-
>> arch/arm/mach-s3c64xx/mach-hmt.c | 2 +-
>> arch/arm/mach-s3c64xx/mach-smartq5.c | 2 +-
>> arch/arm/mach-s3c64xx/mach-smartq7.c | 2 +-
>> arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +-
>> 6 files changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/arch/arm/mach-s3c24xx/mach-h1940.c b/arch/arm/mach-s3c24xx/mach-h1940.c
>> index 7ed7861..6a3e0e6 100644
>> --- a/arch/arm/mach-s3c24xx/mach-h1940.c
>> +++ b/arch/arm/mach-s3c24xx/mach-h1940.c
>> @@ -413,7 +413,7 @@ int h1940_led_blink_set(struct gpio_desc *desc, int state,
>> }
>> EXPORT_SYMBOL(h1940_led_blink_set);
>>
>> -static struct gpio_led h1940_leds_desc[] = {
>> +static const struct gpio_led h1940_leds_desc[] = {
>> {
>> .name = "Green",
>> .default_trigger = "main-battery-full",
>> diff --git a/arch/arm/mach-s3c24xx/mach-rx1950.c b/arch/arm/mach-s3c24xx/mach-rx1950.c
>> index e86ad6a..97bb6a5 100644
>> --- a/arch/arm/mach-s3c24xx/mach-rx1950.c
>> +++ b/arch/arm/mach-s3c24xx/mach-rx1950.c
>> @@ -295,7 +295,7 @@ static int rx1950_led_blink_set(struct gpio_desc *desc, int state,
>> return 0;
>> }
>>
>> -static struct gpio_led rx1950_leds_desc[] = {
>> +static const struct gpio_led rx1950_leds_desc[] = {
>> {
>> .name = "Green",
>> .default_trigger = "main-battery-full",
>> diff --git a/arch/arm/mach-s3c64xx/mach-hmt.c b/arch/arm/mach-s3c64xx/mach-hmt.c
>> index 59b5531..f8d644f 100644
>> --- a/arch/arm/mach-s3c64xx/mach-hmt.c
>> +++ b/arch/arm/mach-s3c64xx/mach-hmt.c
>> @@ -207,7 +207,7 @@ static struct s3c2410_platform_nand hmt_nand_info = {
>> .ecc_mode = NAND_ECC_SOFT,
>> };
>>
>> -static struct gpio_led hmt_leds[] = {
>> +static const struct gpio_led hmt_leds[] = {
>> { /* left function keys */
>> .name = "left:blue",
>> .gpio = S3C64XX_GPO(12),
>> diff --git a/arch/arm/mach-s3c64xx/mach-smartq5.c b/arch/arm/mach-s3c64xx/mach-smartq5.c
>> index 0972b6c..5a7cd8f 100644
>> --- a/arch/arm/mach-s3c64xx/mach-smartq5.c
>> +++ b/arch/arm/mach-s3c64xx/mach-smartq5.c
>> @@ -35,7 +35,7 @@
>> #include "common.h"
>> #include "mach-smartq.h"
>>
>> -static struct gpio_led smartq5_leds[] = {
>> +static const struct gpio_led smartq5_leds[] = {
>> {
>> .name = "smartq5:green",
>> .active_low = 1,
>> diff --git a/arch/arm/mach-s3c64xx/mach-smartq7.c b/arch/arm/mach-s3c64xx/mach-smartq7.c
>> index 51ac1c6..9de9fc2 100644
>> --- a/arch/arm/mach-s3c64xx/mach-smartq7.c
>> +++ b/arch/arm/mach-s3c64xx/mach-smartq7.c
>> @@ -35,7 +35,7 @@
>> #include "common.h"
>> #include "mach-smartq.h"
>>
>> -static struct gpio_led smartq7_leds[] = {
>> +static const struct gpio_led smartq7_leds[] = {
>> {
>> .name = "smartq7:red",
>> .active_low = 1,
>> diff --git a/arch/arm/mach-s3c64xx/mach-smdk6410.c b/arch/arm/mach-s3c64xx/mach-smdk6410.c
>> index 92ec8c3..be9d98f 100644
>> --- a/arch/arm/mach-s3c64xx/mach-smdk6410.c
>> +++ b/arch/arm/mach-s3c64xx/mach-smdk6410.c
>> @@ -497,7 +497,7 @@ static struct wm8350_platform_data __initdata smdk6410_wm8350_pdata = {
>> #endif
>>
>> #ifdef CONFIG_SMDK6410_WM1192_EV1
>> -static struct gpio_led wm1192_pmic_leds[] = {
>> +static const struct gpio_led wm1192_pmic_leds[] = {
>> {
>> .name = "PMIC:red:power",
>> .gpio = GPIO_BOARD_START + 3,
>> --
>> 2.7.4
>>

2017-12-26 23:02:37

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH 09/11 v2] ARM: orion5x: constify gpio_led

Hi Arvind,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on arm-soc/for-next]
[also build test ERROR on v4.15-rc5 next-20171222]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Arvind-Yadav/MIPS-Alchemy-constify-gpio_led/20171227-043658
base: https://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git for-next
config: arm-multi_v5_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm

All errors (new ones prefixed by >>):

arch/arm/mach-orion5x/dns323-setup.c: In function 'dns323_init':
>> arch/arm/mach-orion5x/dns323-setup.c:577:32: error: assignment of member 'active_low' in read-only object
dns323ab_leds[0].active_low = 1;
^

vim +/active_low +577 arch/arm/mach-orion5x/dns323-setup.c

6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 536
555a3656 arch/arm/mach-orion/dns323-setup.c Herbert Valerio Riedel 2007-11-12 537 static void __init dns323_init(void)
555a3656 arch/arm/mach-orion/dns323-setup.c Herbert Valerio Riedel 2007-11-12 538 {
555a3656 arch/arm/mach-orion/dns323-setup.c Herbert Valerio Riedel 2007-11-12 539 /* Setup basic Orion functions. Need to be called early. */
9dd0b194 arch/arm/mach-orion5x/dns323-setup.c Lennert Buytenhek 2008-03-27 540 orion5x_init();
555a3656 arch/arm/mach-orion/dns323-setup.c Herbert Valerio Riedel 2007-11-12 541
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 542 /* Identify revision */
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 543 system_rev = dns323_identify_rev();
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 544 pr_info("DNS-323: Identified HW revision %c1\n", 'A' + system_rev);
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 545
f93e4159 arch/arm/mach-orion5x/dns323-setup.c Matt Palmer 2008-10-22 546 /* Just to be tricky, the 5182 has a completely different
f93e4159 arch/arm/mach-orion5x/dns323-setup.c Matt Palmer 2008-10-22 547 * set of MPP modes to the 5181.
f93e4159 arch/arm/mach-orion5x/dns323-setup.c Matt Palmer 2008-10-22 548 */
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 549 switch(system_rev) {
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 550 case DNS323_REV_A1:
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 551 orion5x_mpp_conf(dns323a_mpp_modes);
79e90dd5 arch/arm/mach-orion5x/dns323-setup.c Lennert Buytenhek 2008-05-28 552 writel(0, MPP_DEV_CTRL); /* DEV_D[31:16] */
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 553 break;
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 554 case DNS323_REV_B1:
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 555 orion5x_mpp_conf(dns323b_mpp_modes);
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 556 break;
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 557 case DNS323_REV_C1:
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 558 orion5x_mpp_conf(dns323c_mpp_modes);
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 559 break;
f93e4159 arch/arm/mach-orion5x/dns323-setup.c Matt Palmer 2008-10-22 560 }
555a3656 arch/arm/mach-orion/dns323-setup.c Herbert Valerio Riedel 2007-11-12 561
044f6c7c arch/arm/mach-orion5x/dns323-setup.c Lennert Buytenhek 2008-04-22 562 /* setup flash mapping
044f6c7c arch/arm/mach-orion5x/dns323-setup.c Lennert Buytenhek 2008-04-22 563 * CS3 holds a 8 MB Spansion S29GL064M90TFIR4
044f6c7c arch/arm/mach-orion5x/dns323-setup.c Lennert Buytenhek 2008-04-22 564 */
4ca2c040 arch/arm/mach-orion5x/dns323-setup.c Thomas Petazzoni 2013-07-26 565 mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET,
4ca2c040 arch/arm/mach-orion5x/dns323-setup.c Thomas Petazzoni 2013-07-26 566 ORION_MBUS_DEVBUS_BOOT_ATTR,
4ca2c040 arch/arm/mach-orion5x/dns323-setup.c Thomas Petazzoni 2013-07-26 567 DNS323_NOR_BOOT_BASE,
5d1190ea arch/arm/mach-orion5x/dns323-setup.c Thomas Petazzoni 2013-03-21 568 DNS323_NOR_BOOT_SIZE);
044f6c7c arch/arm/mach-orion5x/dns323-setup.c Lennert Buytenhek 2008-04-22 569 platform_device_register(&dns323_nor_flash);
044f6c7c arch/arm/mach-orion5x/dns323-setup.c Lennert Buytenhek 2008-04-22 570
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 571 /* Sort out LEDs, Buttons and i2c devices */
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 572 switch(system_rev) {
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 573 case DNS323_REV_A1:
b2a731aa arch/arm/mach-orion5x/dns323-setup.c Laurie Bradshaw 2010-02-10 574 /* The 5181 power LED is active low and requires
b2a731aa arch/arm/mach-orion5x/dns323-setup.c Laurie Bradshaw 2010-02-10 575 * DNS323_GPIO_LED_POWER1 to also be low.
b2a731aa arch/arm/mach-orion5x/dns323-setup.c Laurie Bradshaw 2010-02-10 576 */
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 @577 dns323ab_leds[0].active_low = 1;
5ccc8dab arch/arm/mach-orion5x/dns323-setup.c Arnaud Patard 2010-04-03 578 gpio_request(DNS323_GPIO_LED_POWER1, "Power Led Enable");
b2a731aa arch/arm/mach-orion5x/dns323-setup.c Laurie Bradshaw 2010-02-10 579 gpio_direction_output(DNS323_GPIO_LED_POWER1, 0);
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 580 /* Fall through */
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 581 case DNS323_REV_B1:
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 582 i2c_register_board_info(0, dns323ab_i2c_devices,
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 583 ARRAY_SIZE(dns323ab_i2c_devices));
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 584 break;
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 585 case DNS323_REV_C1:
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 586 /* Hookup LEDs & Buttons */
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 587 dns323_gpio_leds.dev.platform_data = &dns323c_led_data;
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 588 dns323_button_device.dev.platform_data = &dns323c_button_data;
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 589
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 590 /* Hookup i2c devices and fan driver */
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 591 i2c_register_board_info(0, dns323c_i2c_devices,
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 592 ARRAY_SIZE(dns323c_i2c_devices));
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 593 platform_device_register_simple("dns323c-fan", 0, NULL, 0);
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 594
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 595 /* Register fixup for the PHY LEDs */
32ff4971 arch/arm/mach-orion5x/dns323-setup.c Arnd Bergmann 2014-03-13 596 if (!IS_BUILTIN(CONFIG_PHYLIB))
32ff4971 arch/arm/mach-orion5x/dns323-setup.c Arnd Bergmann 2014-03-13 597 break;
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 598 phy_register_fixup_for_uid(MARVELL_PHY_ID_88E1118,
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 599 MARVELL_PHY_ID_MASK,
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 600 dns323c_phy_fixup);
b2a731aa arch/arm/mach-orion5x/dns323-setup.c Laurie Bradshaw 2010-02-10 601 }
b2a731aa arch/arm/mach-orion5x/dns323-setup.c Laurie Bradshaw 2010-02-10 602
044f6c7c arch/arm/mach-orion5x/dns323-setup.c Lennert Buytenhek 2008-04-22 603 platform_device_register(&dns323_gpio_leds);
044f6c7c arch/arm/mach-orion5x/dns323-setup.c Lennert Buytenhek 2008-04-22 604 platform_device_register(&dns323_button_device);
555a3656 arch/arm/mach-orion/dns323-setup.c Herbert Valerio Riedel 2007-11-12 605
a93f44c1 arch/arm/mach-orion5x/dns323-setup.c Matt Palmer 2008-10-19 606 /*
a93f44c1 arch/arm/mach-orion5x/dns323-setup.c Matt Palmer 2008-10-19 607 * Configure peripherals.
a93f44c1 arch/arm/mach-orion5x/dns323-setup.c Matt Palmer 2008-10-19 608 */
a93f44c1 arch/arm/mach-orion5x/dns323-setup.c Matt Palmer 2008-10-19 609 if (dns323_read_mac_addr() < 0)
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 610 printk("DNS-323: Failed to read MAC address\n");
a93f44c1 arch/arm/mach-orion5x/dns323-setup.c Matt Palmer 2008-10-19 611 orion5x_ehci0_init();
a93f44c1 arch/arm/mach-orion5x/dns323-setup.c Matt Palmer 2008-10-19 612 orion5x_eth_init(&dns323_eth_data);
a93f44c1 arch/arm/mach-orion5x/dns323-setup.c Matt Palmer 2008-10-19 613 orion5x_i2c_init();
a93f44c1 arch/arm/mach-orion5x/dns323-setup.c Matt Palmer 2008-10-19 614 orion5x_uart0_init();
a93f44c1 arch/arm/mach-orion5x/dns323-setup.c Matt Palmer 2008-10-19 615
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 616 /* Remaining GPIOs */
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 617 switch(system_rev) {
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 618 case DNS323_REV_A1:
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 619 /* Poweroff GPIO */
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 620 if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 ||
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 621 gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 622 pr_err("DNS-323: failed to setup power-off GPIO\n");
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 623 pm_power_off = dns323a_power_off;
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 624 break;
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 625 case DNS323_REV_B1:
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 626 /* 5182 built-in SATA init */
f93e4159 arch/arm/mach-orion5x/dns323-setup.c Matt Palmer 2008-10-22 627 orion5x_sata_init(&dns323_sata_data);
f93e4159 arch/arm/mach-orion5x/dns323-setup.c Matt Palmer 2008-10-22 628
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 629 /* The DNS323 rev B1 has flag to indicate the system is up.
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 630 * Without this flag set, power LED will flash and cannot be
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 631 * controlled via leds-gpio.
cf11052a arch/arm/mach-orion5x/dns323-setup.c Erik Benada 2010-01-24 632 */
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 633 if (gpio_request(DNS323_GPIO_SYSTEM_UP, "SYS_READY") == 0)
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 634 gpio_direction_output(DNS323_GPIO_SYSTEM_UP, 1);
cf11052a arch/arm/mach-orion5x/dns323-setup.c Erik Benada 2010-01-24 635
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 636 /* Poweroff GPIO */
044f6c7c arch/arm/mach-orion5x/dns323-setup.c Lennert Buytenhek 2008-04-22 637 if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 ||
044f6c7c arch/arm/mach-orion5x/dns323-setup.c Lennert Buytenhek 2008-04-22 638 gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 639 pr_err("DNS-323: failed to setup power-off GPIO\n");
cf11052a arch/arm/mach-orion5x/dns323-setup.c Erik Benada 2010-01-24 640 pm_power_off = dns323b_power_off;
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 641 break;
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 642 case DNS323_REV_C1:
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 643 /* 5182 built-in SATA init */
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 644 orion5x_sata_init(&dns323_sata_data);
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 645
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 646 /* Poweroff GPIO */
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 647 if (gpio_request(DNS323C_GPIO_POWER_OFF, "POWEROFF") != 0 ||
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 648 gpio_direction_output(DNS323C_GPIO_POWER_OFF, 0) != 0)
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 649 pr_err("DNS-323: failed to setup power-off GPIO\n");
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 650 pm_power_off = dns323c_power_off;
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 651
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 652 /* Now, -this- should theorically be done by the sata_mv driver
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 653 * once I figure out what's going on there. Maybe the behaviour
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 654 * of the LEDs should be somewhat passed via the platform_data.
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 655 * for now, just whack the register and make the LEDs happy
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 656 *
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 657 * Note: AFAIK, rev B1 needs the same treatement but I'll let
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 658 * somebody else test it.
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 659 */
3904a393 arch/arm/mach-orion5x/dns323-setup.c Thomas Petazzoni 2012-09-11 660 writel(0x5, ORION5X_SATA_VIRT_BASE + 0x2c);
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 661 break;
6e2daa49 arch/arm/mach-orion5x/dns323-setup.c Benjamin Herrenschmidt 2010-06-21 662 }
555a3656 arch/arm/mach-orion/dns323-setup.c Herbert Valerio Riedel 2007-11-12 663 }
555a3656 arch/arm/mach-orion/dns323-setup.c Herbert Valerio Riedel 2007-11-12 664

:::::: The code at line 577 was first introduced by commit
:::::: 6e2daa49420777190c133d7097dd8d5c05b475ac [ARM] orion5x: Base support for DNS-323 rev C1

:::::: TO: Benjamin Herrenschmidt <[email protected]>
:::::: CC: Nicolas Pitre <[email protected]>

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation


Attachments:
(No filename) (16.24 kB)
.config.gz (29.18 kB)
Download all attachments

2017-12-27 08:19:08

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 10/11 v3] ARM: s3c24xx/s3c64xx: constify gpio_led

On Tue, Dec 26, 2017 at 7:50 PM, Arvind Yadav <[email protected]> wrote:
> gpio_led are not supposed to change at runtime.
> struct gpio_led_platform_data working with const gpio_led
> provided by <linux/leds.h>. So mark the non-const structs
> as const.
>
> Signed-off-by: Arvind Yadav <[email protected]>
> ---
> changes in v2:
> The GPIO LED driver can be built as a module, it can
> be loaded after the init sections have gone away.
> So removed '__initconst'.
> changes in v3:
> Description was missing.
>
> arch/arm/mach-s3c24xx/mach-h1940.c | 2 +-
> arch/arm/mach-s3c24xx/mach-rx1950.c | 2 +-
> arch/arm/mach-s3c64xx/mach-hmt.c | 2 +-
> arch/arm/mach-s3c64xx/mach-smartq5.c | 2 +-
> arch/arm/mach-s3c64xx/mach-smartq7.c | 2 +-
> arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +-
> 6 files changed, 6 insertions(+), 6 deletions(-)

There were few build errors reported by kbuild for your patches. Are
you sure that you compiled every file you touch?

Best regards,
Krzysztof

2017-12-27 11:03:21

by Arvind Yadav

[permalink] [raw]
Subject: Re: [PATCH 10/11 v3] ARM: s3c24xx/s3c64xx: constify gpio_led

Hi,

On Wednesday 27 December 2017 01:49 PM, Krzysztof Kozlowski wrote:
> On Tue, Dec 26, 2017 at 7:50 PM, Arvind Yadav <[email protected]> wrote:
>> gpio_led are not supposed to change at runtime.
>> struct gpio_led_platform_data working with const gpio_led
>> provided by <linux/leds.h>. So mark the non-const structs
>> as const.
>>
>> Signed-off-by: Arvind Yadav <[email protected]>
>> ---
>> changes in v2:
>> The GPIO LED driver can be built as a module, it can
>> be loaded after the init sections have gone away.
>> So removed '__initconst'.
>> changes in v3:
>> Description was missing.
>>
>> arch/arm/mach-s3c24xx/mach-h1940.c | 2 +-
>> arch/arm/mach-s3c24xx/mach-rx1950.c | 2 +-
>> arch/arm/mach-s3c64xx/mach-hmt.c | 2 +-
>> arch/arm/mach-s3c64xx/mach-smartq5.c | 2 +-
>> arch/arm/mach-s3c64xx/mach-smartq7.c | 2 +-
>> arch/arm/mach-s3c64xx/mach-smdk6410.c | 2 +-
>> 6 files changed, 6 insertions(+), 6 deletions(-)
> There were few build errors reported by kbuild for your patches. Are
> you sure that you compiled every file you touch?
>
> Best regards,
> Krzysztof
Yes, I got few build error which I have fixed it. and send updated patch.
Now I have done cross checking. It's not having any build failure.

Regards
arvind

2018-01-09 17:32:49

by Aaro Koskinen

[permalink] [raw]
Subject: Re: [PATCH 08/11 v2] ARM: OMAP1: constify gpio_led

On Tue, Dec 26, 2017 at 12:07:11PM +0530, Arvind Yadav wrote:
> gpio_led are not supposed to change at runtime.
> struct gpio_led_platform_data working with const gpio_led
> provided by <linux/leds.h>. So mark the non-const structs
> as const.
>
> Signed-off-by: Arvind Yadav <[email protected]>

Acked-by: Aaro Koskinen <[email protected]>

A.

> ---
> changes in v2:
> The GPIO LED driver can be built as a module, it can
> be loaded after the init sections have gone away.
> So removed '__initconst'.
>
> arch/arm/mach-omap1/board-h2.c | 2 +-
> arch/arm/mach-omap1/board-h3.c | 2 +-
> arch/arm/mach-omap1/board-htcherald.c | 2 +-
> arch/arm/mach-omap1/board-osk.c | 4 ++--
> 4 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
> index ab51f85..9aeb8ad 100644
> --- a/arch/arm/mach-omap1/board-h2.c
> +++ b/arch/arm/mach-omap1/board-h2.c
> @@ -274,7 +274,7 @@ static struct platform_device h2_kp_device = {
> .resource = h2_kp_resources,
> };
>
> -static struct gpio_led h2_gpio_led_pins[] = {
> +static const struct gpio_led h2_gpio_led_pins[] = {
> {
> .name = "h2:red",
> .default_trigger = "heartbeat",
> diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
> index ad339f5..2edcd63 100644
> --- a/arch/arm/mach-omap1/board-h3.c
> +++ b/arch/arm/mach-omap1/board-h3.c
> @@ -326,7 +326,7 @@ static struct spi_board_info h3_spi_board_info[] __initdata = {
> },
> };
>
> -static struct gpio_led h3_gpio_led_pins[] = {
> +static const struct gpio_led h3_gpio_led_pins[] = {
> {
> .name = "h3:red",
> .default_trigger = "heartbeat",
> diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c
> index 67d4669..e6a79fd 100644
> --- a/arch/arm/mach-omap1/board-htcherald.c
> +++ b/arch/arm/mach-omap1/board-htcherald.c
> @@ -292,7 +292,7 @@ static struct platform_device herald_gpiokeys_device = {
> };
>
> /* LEDs for the Herald. These connect to the HTCPLD GPIO device. */
> -static struct gpio_led gpio_leds[] = {
> +static const struct gpio_led gpio_leds[] = {
> {"dpad", NULL, HTCPLD_GPIO_LED_DPAD, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
> {"kbd", NULL, HTCPLD_GPIO_LED_KBD, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
> {"vibrate", NULL, HTCPLD_GPIO_LED_VIBRATE, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
> diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
> index c66372e..e2277b5 100644
> --- a/arch/arm/mach-omap1/board-osk.c
> +++ b/arch/arm/mach-omap1/board-osk.c
> @@ -167,7 +167,7 @@ static struct platform_device *osk5912_devices[] __initdata = {
> &osk5912_cf_device,
> };
>
> -static struct gpio_led tps_leds[] = {
> +static const struct gpio_led tps_leds[] = {
> /* NOTE: D9 and D2 have hardware blink support.
> * Also, D9 requires non-battery power.
> */
> @@ -385,7 +385,7 @@ static struct platform_device osk5912_lcd_device = {
> .id = -1,
> };
>
> -static struct gpio_led mistral_gpio_led_pins[] = {
> +static const struct gpio_led mistral_gpio_led_pins[] = {
> {
> .name = "mistral:red",
> .default_trigger = "heartbeat",
> --
> 2.7.4
>

2018-07-02 11:46:07

by Tony Lindgren

[permalink] [raw]
Subject: Re: [PATCH 08/11 v2] ARM: OMAP1: constify gpio_led

* Arvind Yadav <[email protected]> [171225 22:40]:
> gpio_led are not supposed to change at runtime.
> struct gpio_led_platform_data working with const gpio_led
> provided by <linux/leds.h>. So mark the non-const structs
> as const.
>
> Signed-off-by: Arvind Yadav <[email protected]>
> ---
> changes in v2:
> The GPIO LED driver can be built as a module, it can
> be loaded after the init sections have gone away.
> So removed '__initconst'.

Sorry just noticed I still have this one tagged and it's still
pending.. Applying into omap-for-v4.19/omap1.

Regards,

Tony


> arch/arm/mach-omap1/board-h2.c | 2 +-
> arch/arm/mach-omap1/board-h3.c | 2 +-
> arch/arm/mach-omap1/board-htcherald.c | 2 +-
> arch/arm/mach-omap1/board-osk.c | 4 ++--
> 4 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c
> index ab51f85..9aeb8ad 100644
> --- a/arch/arm/mach-omap1/board-h2.c
> +++ b/arch/arm/mach-omap1/board-h2.c
> @@ -274,7 +274,7 @@ static struct platform_device h2_kp_device = {
> .resource = h2_kp_resources,
> };
>
> -static struct gpio_led h2_gpio_led_pins[] = {
> +static const struct gpio_led h2_gpio_led_pins[] = {
> {
> .name = "h2:red",
> .default_trigger = "heartbeat",
> diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c
> index ad339f5..2edcd63 100644
> --- a/arch/arm/mach-omap1/board-h3.c
> +++ b/arch/arm/mach-omap1/board-h3.c
> @@ -326,7 +326,7 @@ static struct spi_board_info h3_spi_board_info[] __initdata = {
> },
> };
>
> -static struct gpio_led h3_gpio_led_pins[] = {
> +static const struct gpio_led h3_gpio_led_pins[] = {
> {
> .name = "h3:red",
> .default_trigger = "heartbeat",
> diff --git a/arch/arm/mach-omap1/board-htcherald.c b/arch/arm/mach-omap1/board-htcherald.c
> index 67d4669..e6a79fd 100644
> --- a/arch/arm/mach-omap1/board-htcherald.c
> +++ b/arch/arm/mach-omap1/board-htcherald.c
> @@ -292,7 +292,7 @@ static struct platform_device herald_gpiokeys_device = {
> };
>
> /* LEDs for the Herald. These connect to the HTCPLD GPIO device. */
> -static struct gpio_led gpio_leds[] = {
> +static const struct gpio_led gpio_leds[] = {
> {"dpad", NULL, HTCPLD_GPIO_LED_DPAD, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
> {"kbd", NULL, HTCPLD_GPIO_LED_KBD, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
> {"vibrate", NULL, HTCPLD_GPIO_LED_VIBRATE, 0, 0, LEDS_GPIO_DEFSTATE_OFF},
> diff --git a/arch/arm/mach-omap1/board-osk.c b/arch/arm/mach-omap1/board-osk.c
> index c66372e..e2277b5 100644
> --- a/arch/arm/mach-omap1/board-osk.c
> +++ b/arch/arm/mach-omap1/board-osk.c
> @@ -167,7 +167,7 @@ static struct platform_device *osk5912_devices[] __initdata = {
> &osk5912_cf_device,
> };
>
> -static struct gpio_led tps_leds[] = {
> +static const struct gpio_led tps_leds[] = {
> /* NOTE: D9 and D2 have hardware blink support.
> * Also, D9 requires non-battery power.
> */
> @@ -385,7 +385,7 @@ static struct platform_device osk5912_lcd_device = {
> .id = -1,
> };
>
> -static struct gpio_led mistral_gpio_led_pins[] = {
> +static const struct gpio_led mistral_gpio_led_pins[] = {
> {
> .name = "mistral:red",
> .default_trigger = "heartbeat",
> --
> 2.7.4
>