This is an automated email from the ASF dual-hosted git repository.
linguini pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 0a6a2e5e043 serial/uart_rpmsg: Remove redundant
CONFIG_RPMSG_UART_CONSOLE macro check
0a6a2e5e043 is described below
commit 0a6a2e5e043a2647990c2b9c4688cdcdf48b1561
Author: chao an <[email protected]>
AuthorDate: Tue Mar 3 18:24:42 2026 +0800
serial/uart_rpmsg: Remove redundant CONFIG_RPMSG_UART_CONSOLE macro check
Remove the unnecessary CONFIG_RPMSG_UART_CONSOLE preprocessor guard around
the console registration logic in uart_rpmsg_init().
The uart_rpmsg_init() function already accepts a bool isconsole parameter to
dynamically control console registration, which is designed to support
flexible
console setup in distributed multi-core SOC systems. Adding the macro check
on
top of this runtime parameter is redundant and negates the dynamic
registration
capability.
This change fixes a regression introduced by PR #18410, which broke the
functionality
of sim/rpproxy and sim/rpserver due to the incorrect macro guard preventing
proper
console registration for the rpmsg UART device.
Signed-off-by: chao an <[email protected]>
---
drivers/serial/uart_rpmsg.c | 2 --
drivers/serial/uart_rpmsg_raw.c | 2 --
2 files changed, 4 deletions(-)
diff --git a/drivers/serial/uart_rpmsg.c b/drivers/serial/uart_rpmsg.c
index 12205c232af..2fc7d273f38 100644
--- a/drivers/serial/uart_rpmsg.c
+++ b/drivers/serial/uart_rpmsg.c
@@ -458,12 +458,10 @@ int uart_rpmsg_init(FAR const char *cpuname, FAR const
char *devname,
UART_RPMSG_DEV_PREFIX, devname);
uart_register(name, dev);
- #ifdef CONFIG_RPMSG_UART_CONSOLE
if (dev->isconsole)
{
uart_register(UART_RPMSG_DEV_CONSOLE, dev);
}
- #endif
return 0;
}
diff --git a/drivers/serial/uart_rpmsg_raw.c b/drivers/serial/uart_rpmsg_raw.c
index a658b3f61d3..8e40b2b9600 100644
--- a/drivers/serial/uart_rpmsg_raw.c
+++ b/drivers/serial/uart_rpmsg_raw.c
@@ -369,12 +369,10 @@ int uart_rpmsg_raw_init(FAR const char *cpuname, FAR
const char *devname,
UART_RPMSG_DEV_PREFIX, devname);
uart_register(name, dev);
-#ifdef CONFIG_RPMSG_UART_RAW_CONSOLE
if (dev->isconsole)
{
uart_register(UART_RPMSG_DEV_CONSOLE, dev);
}
-#endif
return 0;
}