public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH] serial: omap: Fix "unused" warnings with SERIAL_PRESENT=n and OF_REAL=y
Date: Mon, 23 Mar 2026 13:53:06 -0600	[thread overview]
Message-ID: <20260323195306.2363609-1-trini@konsulko.com> (raw)

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.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 drivers/serial/serial_omap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/serial/serial_omap.c b/drivers/serial/serial_omap.c
index 224d9cbf29d7..8289336e08dc 100644
--- a/drivers/serial/serial_omap.c
+++ b/drivers/serial/serial_omap.c
@@ -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);
-- 
2.43.0


             reply	other threads:[~2026-03-23 19:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-23 19:53 Tom Rini [this message]
2026-04-07 19:50 ` [PATCH] serial: omap: Fix "unused" warnings with SERIAL_PRESENT=n and OF_REAL=y Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260323195306.2363609-1-trini@konsulko.com \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox