Skip to contentSkip to conversation

serial: omap: Fix "unused" warnings with SERIAL_PRESENT=n and OF_REAL=y

PATCH In review Tom Rini 1 participant 2 messages Mar 23 – Apr 7

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 serial: omap: Fix "unused" warnings with SERIAL_PRESENT=n and OF_REAL=y

The definition of our ID table (and of_to_plat function) is guarded with OF_REAL however the U_BOOT_DRIVER that would in turn use the table is guarded with SERIAL_PRESENT. To avoid a potential warning we must also guard both with SERIAL_PRESENT.

---
 drivers/serial/serial_omap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/serial/serial_omap.c +1 -1
index 224d9cbf29d7..8289336e08dc 100644
@@ -104,7 +104,7 @@ DEBUG_UART_FUNCS
 
 #if CONFIG_IS_ENABLED(DM_SERIAL)
 
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if CONFIG_IS_ENABLED(OF_REAL) && CONFIG_IS_ENABLED(SERIAL_PRESENT)
 static int omap_serial_of_to_plat(struct udevice *dev)
 {
 	struct ns16550_plat *plat = dev_get_plat(dev);
Signature · 1 line
2.43.0
author
#1 lore raw
Quoted 6 lines · Tom Rini

The definition of our ID table (and of_to_plat function) is guarded with OF_REAL however the U_BOOT_DRIVER that would in turn use the table is guarded with SERIAL_PRESENT. To avoid a potential warning we must also guard both with SERIAL_PRESENT.

Applied to u-boot/master, thanks!

[1/1] serial: omap: Fix "unused" warnings with SERIAL_PRESENT=n and OF_REAL=y

      commit: 3fe899fbeae62b8408c1e70532fe58cdab959dd0
Signature · 1 line
Tom