diff mbox series

[3/3] ARM: davinci: mark spi_board_info arrays as const

Message ID 20180220162519.1498223-3-arnd@arndb.de
State Accepted
Commit eec51afc9d2612c65523627cfd81456c6995a79a
Headers show
Series [1/3] ARM: clps711x: mark clps711x_compat as const | expand

Commit Message

Arnd Bergmann Feb. 20, 2018, 4:24 p.m. UTC
Building with LTO revealed that three spi_board_info arrays are marked
__initconst, but not const:

arch/arm/mach-davinci/board-dm365-evm.c: In function 'dm365_evm_init':
arch/arm/mach-davinci/board-dm365-evm.c:729:30: error: 'dm365_evm_spi_info' causes a section type conflict with 'dm646x_edma_device'
 static struct spi_board_info dm365_evm_spi_info[] __initconst = {
                              ^
arch/arm/mach-davinci/dm646x.c:603:42: note: 'dm646x_edma_device' was declared here
 static const struct platform_device_info dm646x_edma_device __initconst = {

This marks them const as well, as was originally intended.

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

---
 arch/arm/mach-davinci/board-dm355-evm.c     | 2 +-
 arch/arm/mach-davinci/board-dm355-leopard.c | 2 +-
 arch/arm/mach-davinci/board-dm365-evm.c     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.9.0

Comments

Arnd Bergmann Feb. 22, 2018, 4:43 p.m. UTC | #1
On Tue, Feb 20, 2018 at 5:24 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> Building with LTO revealed that three spi_board_info arrays are marked

> __initconst, but not const:

>

> arch/arm/mach-davinci/board-dm365-evm.c: In function 'dm365_evm_init':

> arch/arm/mach-davinci/board-dm365-evm.c:729:30: error: 'dm365_evm_spi_info' causes a section type conflict with 'dm646x_edma_device'

>  static struct spi_board_info dm365_evm_spi_info[] __initconst = {

>                               ^

> arch/arm/mach-davinci/dm646x.c:603:42: note: 'dm646x_edma_device' was declared here

>  static const struct platform_device_info dm646x_edma_device __initconst = {

>

> This marks them const as well, as was originally intended.

>

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


I applied this to the fixes branch now.

      Arnd
Sekhar Nori Feb. 23, 2018, 10 a.m. UTC | #2
On Thursday 22 February 2018 10:13 PM, Arnd Bergmann wrote:
> On Tue, Feb 20, 2018 at 5:24 PM, Arnd Bergmann <arnd@arndb.de> wrote:

>> Building with LTO revealed that three spi_board_info arrays are marked

>> __initconst, but not const:

>>

>> arch/arm/mach-davinci/board-dm365-evm.c: In function 'dm365_evm_init':

>> arch/arm/mach-davinci/board-dm365-evm.c:729:30: error: 'dm365_evm_spi_info' causes a section type conflict with 'dm646x_edma_device'

>>  static struct spi_board_info dm365_evm_spi_info[] __initconst = {

>>                               ^

>> arch/arm/mach-davinci/dm646x.c:603:42: note: 'dm646x_edma_device' was declared here

>>  static const struct platform_device_info dm646x_edma_device __initconst = {

>>

>> This marks them const as well, as was originally intended.

>>

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

> 

> I applied this to the fixes branch now.


Thanks Arnd. FWIW now:

Acked-by: Sekhar Nori <nsekhar@ti.com>


Regards,
Sekhar
diff mbox series

Patch

diff --git a/arch/arm/mach-davinci/board-dm355-evm.c b/arch/arm/mach-davinci/board-dm355-evm.c
index e457f299cd44..d6b11907380c 100644
--- a/arch/arm/mach-davinci/board-dm355-evm.c
+++ b/arch/arm/mach-davinci/board-dm355-evm.c
@@ -368,7 +368,7 @@  static struct spi_eeprom at25640a = {
 	.flags		= EE_ADDR2,
 };
 
-static struct spi_board_info dm355_evm_spi_info[] __initconst = {
+static const struct spi_board_info dm355_evm_spi_info[] __initconst = {
 	{
 		.modalias	= "at25",
 		.platform_data	= &at25640a,
diff --git a/arch/arm/mach-davinci/board-dm355-leopard.c b/arch/arm/mach-davinci/board-dm355-leopard.c
index be997243447b..fad9a5611a5d 100644
--- a/arch/arm/mach-davinci/board-dm355-leopard.c
+++ b/arch/arm/mach-davinci/board-dm355-leopard.c
@@ -217,7 +217,7 @@  static struct spi_eeprom at25640a = {
 	.flags		= EE_ADDR2,
 };
 
-static struct spi_board_info dm355_leopard_spi_info[] __initconst = {
+static const struct spi_board_info dm355_leopard_spi_info[] __initconst = {
 	{
 		.modalias	= "at25",
 		.platform_data	= &at25640a,
diff --git a/arch/arm/mach-davinci/board-dm365-evm.c b/arch/arm/mach-davinci/board-dm365-evm.c
index e75741fb2c1d..e3780986d2a3 100644
--- a/arch/arm/mach-davinci/board-dm365-evm.c
+++ b/arch/arm/mach-davinci/board-dm365-evm.c
@@ -726,7 +726,7 @@  static struct spi_eeprom at25640 = {
 	.flags		= EE_ADDR2,
 };
 
-static struct spi_board_info dm365_evm_spi_info[] __initconst = {
+static const struct spi_board_info dm365_evm_spi_info[] __initconst = {
 	{
 		.modalias	= "at25",
 		.platform_data	= &at25640,