Skip to contentSkip to conversation

include: configs: Fix build warnings due to redefined

PATCH New suniel.spartan at gmail.com 3 participants 3 messages Apr 11, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 include: configs: Fix build warnings due to redefined

From: Suniel Mahesh <[email protected]>

Driver model for OMAP24XX and later Multichannel SPI master controller, if used, OMAP3 SPI configuration is set.
The same configuration is defined in ti_armv7_omap.h, because of redefinition, warnings are spilled during build.

Fixed warnings for AM335x SOC by using #ifndef directive in ti_armv7_omap.h.

---
Note:
Tested on Beaglebone Black using latest u-boot mainline tree with device tree set

---
 include/configs/ti_armv7_omap.h | 2 ++
 1 file changed, 2 insertions(+)
include/configs/ti_armv7_omap.h +2 -0
index de14b85..3167b61 100644
@@ -21,7 +21,9 @@
 #define CONFIG_SYS_I2C_OMAP24XX
 
 /* SPI IP Block */
+#ifndef CONFIG_OMAP3_SPI
 #define CONFIG_OMAP3_SPI
+#endif
 
 /* GPIO block */
 #define CONFIG_OMAP_GPIO
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 include: configs: Fix build warnings due to redefined

Quoted 6 lines · suniel.spartan at gmail.com

From: Suniel Mahesh <[email protected]>

Driver model for OMAP24XX and later Multichannel SPI master controller, if used, OMAP3 SPI configuration is set.
The same configuration is defined in ti_armv7_omap.h, because of redefinition, warnings are spilled during build.

If it's set by Kconfig, it should NOT be set in include/configs/ . If I understand the explanation right, it is set by Kconfig and thus this patch is wrong. The correct fix is to remove it from here and verify that no board is affected.

Quoted 27 lines

Fixed warnings for AM335x SOC by using #ifndef directive in ti_armv7_omap.h.

---
Note:
Tested on Beaglebone Black using latest u-boot mainline tree with device tree set

---
 include/configs/ti_armv7_omap.h | 2 ++
 1 file changed, 2 insertions(+)
include/configs/ti_armv7_omap.h +2 -0
index de14b85..3167b61 100644
@@ -21,7 +21,9 @@
 #define CONFIG_SYS_I2C_OMAP24XX
 
 /* SPI IP Block */
+#ifndef CONFIG_OMAP3_SPI
 #define CONFIG_OMAP3_SPI
+#endif
 
 /* GPIO block */
 #define CONFIG_OMAP_GPIO
Signature · 2 lines
Best regards,
Marek Vasut
#2 lore raw

PATCH 1/1 include: configs: Fix build warnings due to redefined

Quoted 8 lines · Marek Vasut
Quoted 6 lines · suniel.spartan at gmail.com

From: Suniel Mahesh <[email protected]>

Driver model for OMAP24XX and later Multichannel SPI master controller, if used, OMAP3 SPI configuration is set.
The same configuration is defined in ti_armv7_omap.h, because of redefinition, warnings are spilled during build.

Quoted 4 lines

If it's set by Kconfig, it should NOT be set in include/configs/ . If I understand the explanation right, it is set by Kconfig and thus this patch is wrong. The correct fix is to remove it from here and verify that no board is affected.

Correct, moveconfig.py needs to be run to migrate the rest of the users over. Thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170411/78f80b45/attachment.sig>