* [PATCH v1] serial: qcom-geni: Avoid probing debug console UART without console support
@ 2026-04-13 7:25 Aniket Randive
2026-04-27 9:18 ` Praveen Talari
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Aniket Randive @ 2026-04-13 7:25 UTC (permalink / raw)
To: gregkh, jirislaby, linux-arm-msm, linux-kernel, linux-serial,
praveen.talari, anup.kulkarni, dmitry.baryshkov, viken.dadhaniya
Cc: Aniket Randive
When CONFIG_SERIAL_QCOM_GENI_CONSOLE is disabled, the driver still
advertises the debug UART compatible strings ("qcom,geni-debug-uart"
and "qcom,sa8255p-geni-debug-uart") in its of_match table. This lets the
driver match and probe console UART DT nodes even though console
support is not built. As a result, the console port is never registered
with the UART core and uart_add_one_port() fails with -EINVAL.
Fix this by only including the debug UART compatible entries in the
match table when CONFIG_SERIAL_QCOM_GENI_CONSOLE is enabled, preventing
the driver from probing console UART nodes when console support is
absent.
Signed-off-by: Aniket Randive <aniket.randive@oss.qualcomm.com>
---
drivers/tty/serial/qcom_geni_serial.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index 9854bb2406e3..b756e0c07c16 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -2039,6 +2039,7 @@ static const struct dev_pm_ops qcom_geni_serial_pm_ops = {
};
static const struct of_device_id qcom_geni_serial_match_table[] = {
+#if IS_ENABLED(CONFIG_SERIAL_QCOM_GENI_CONSOLE)
{
.compatible = "qcom,geni-debug-uart",
.data = &qcom_geni_console_data,
@@ -2047,6 +2048,7 @@ static const struct of_device_id qcom_geni_serial_match_table[] = {
.compatible = "qcom,sa8255p-geni-debug-uart",
.data = &sa8255p_qcom_geni_console_data,
},
+#endif
{
.compatible = "qcom,geni-uart",
.data = &qcom_geni_uart_data,
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v1] serial: qcom-geni: Avoid probing debug console UART without console support
2026-04-13 7:25 [PATCH v1] serial: qcom-geni: Avoid probing debug console UART without console support Aniket Randive
@ 2026-04-27 9:18 ` Praveen Talari
2026-04-30 3:42 ` kernel test robot
2026-04-30 14:40 ` kernel test robot
2 siblings, 0 replies; 4+ messages in thread
From: Praveen Talari @ 2026-04-27 9:18 UTC (permalink / raw)
To: Aniket Randive, gregkh, jirislaby, linux-arm-msm, linux-kernel,
linux-serial, anup.kulkarni, dmitry.baryshkov, viken.dadhaniya
On 13-04-2026 12:55, Aniket Randive wrote:
> When CONFIG_SERIAL_QCOM_GENI_CONSOLE is disabled, the driver still
> advertises the debug UART compatible strings ("qcom,geni-debug-uart"
> and "qcom,sa8255p-geni-debug-uart") in its of_match table. This lets the
> driver match and probe console UART DT nodes even though console
> support is not built. As a result, the console port is never registered
> with the UART core and uart_add_one_port() fails with -EINVAL.
>
> Fix this by only including the debug UART compatible entries in the
> match table when CONFIG_SERIAL_QCOM_GENI_CONSOLE is enabled, preventing
> the driver from probing console UART nodes when console support is
> absent.
>
> Signed-off-by: Aniket Randive <aniket.randive@oss.qualcomm.com>
> ---
> drivers/tty/serial/qcom_geni_serial.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
> index 9854bb2406e3..b756e0c07c16 100644
> --- a/drivers/tty/serial/qcom_geni_serial.c
> +++ b/drivers/tty/serial/qcom_geni_serial.c
> @@ -2039,6 +2039,7 @@ static const struct dev_pm_ops qcom_geni_serial_pm_ops = {
> };
>
> static const struct of_device_id qcom_geni_serial_match_table[] = {
> +#if IS_ENABLED(CONFIG_SERIAL_QCOM_GENI_CONSOLE)
> {
> .compatible = "qcom,geni-debug-uart",
> .data = &qcom_geni_console_data,
> @@ -2047,6 +2048,7 @@ static const struct of_device_id qcom_geni_serial_match_table[] = {
> .compatible = "qcom,sa8255p-geni-debug-uart",
> .data = &sa8255p_qcom_geni_console_data,
> },
> +#endif
> {
> .compatible = "qcom,geni-uart",
> .data = &qcom_geni_uart_data,
Reviewed-by: Praveen Talari <praveen.talari@oss.qualcomm.com>
Thanks,
Praveen Talari
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] serial: qcom-geni: Avoid probing debug console UART without console support
2026-04-13 7:25 [PATCH v1] serial: qcom-geni: Avoid probing debug console UART without console support Aniket Randive
2026-04-27 9:18 ` Praveen Talari
@ 2026-04-30 3:42 ` kernel test robot
2026-04-30 14:40 ` kernel test robot
2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2026-04-30 3:42 UTC (permalink / raw)
To: Aniket Randive, gregkh, jirislaby, linux-arm-msm, linux-kernel,
linux-serial, praveen.talari, anup.kulkarni, dmitry.baryshkov,
viken.dadhaniya
Cc: llvm, oe-kbuild-all, Aniket Randive
Hi Aniket,
kernel test robot noticed the following build warnings:
[auto build test WARNING on tty/tty-testing]
[also build test WARNING on tty/tty-next tty/tty-linus usb/usb-testing usb/usb-next usb/usb-linus linus/master v7.1-rc1 next-20260429]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Aniket-Randive/serial-qcom-geni-Avoid-probing-debug-console-UART-without-console-support/20260423-150710
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
patch link: https://lore.kernel.org/r/20260413072501.263871-1-aniket.randive%40oss.qualcomm.com
patch subject: [PATCH v1] serial: qcom-geni: Avoid probing debug console UART without console support
config: s390-randconfig-002-20260430 (https://download.01.org/0day-ci/archive/20260430/202604301151.rPBXnWLg-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 5bac06718f502014fade905512f1d26d578a18f3)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260430/202604301151.rPBXnWLg-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604301151.rPBXnWLg-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/tty/serial/qcom_geni_serial.c:1995:43: warning: unused variable 'qcom_geni_console_data' [-Wunused-const-variable]
1995 | static const struct qcom_geni_device_data qcom_geni_console_data = {
| ^~~~~~~~~~~~~~~~~~~~~~
>> drivers/tty/serial/qcom_geni_serial.c:2011:43: warning: unused variable 'sa8255p_qcom_geni_console_data' [-Wunused-const-variable]
2011 | static const struct qcom_geni_device_data sa8255p_qcom_geni_console_data = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
vim +/qcom_geni_console_data +1995 drivers/tty/serial/qcom_geni_serial.c
c4f528795d1add Karthikeyan Ramasubramanian 2018-03-14 1994
40ec6d41c841e2 Bartosz Golaszewski 2022-12-29 @1995 static const struct qcom_geni_device_data qcom_geni_console_data = {
40ec6d41c841e2 Bartosz Golaszewski 2022-12-29 1996 .console = true,
2aaa43c7077833 Bartosz Golaszewski 2022-12-29 1997 .mode = GENI_SE_FIFO,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 1998 .resources_init = geni_serial_resource_init,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 1999 .set_rate = geni_serial_set_rate,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2000 .power_state = geni_serial_resource_state,
40ec6d41c841e2 Bartosz Golaszewski 2022-12-29 2001 };
40ec6d41c841e2 Bartosz Golaszewski 2022-12-29 2002
40ec6d41c841e2 Bartosz Golaszewski 2022-12-29 2003 static const struct qcom_geni_device_data qcom_geni_uart_data = {
40ec6d41c841e2 Bartosz Golaszewski 2022-12-29 2004 .console = false,
2aaa43c7077833 Bartosz Golaszewski 2022-12-29 2005 .mode = GENI_SE_DMA,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2006 .resources_init = geni_serial_resource_init,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2007 .set_rate = geni_serial_set_rate,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2008 .power_state = geni_serial_resource_state,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2009 };
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2010
abffd1e6c4f1c9 Praveen Talari 2025-11-10 @2011 static const struct qcom_geni_device_data sa8255p_qcom_geni_console_data = {
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2012 .console = true,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2013 .mode = GENI_SE_FIFO,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2014 .pd_data = {
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2015 .pd_flags = PD_FLAG_DEV_LINK_ON,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2016 .pd_names = (const char*[]) { "power", "perf" },
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2017 .num_pd_names = 2,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2018 },
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2019 .resources_init = geni_serial_pwr_init,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2020 .set_rate = geni_serial_set_level,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2021 };
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2022
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1] serial: qcom-geni: Avoid probing debug console UART without console support
2026-04-13 7:25 [PATCH v1] serial: qcom-geni: Avoid probing debug console UART without console support Aniket Randive
2026-04-27 9:18 ` Praveen Talari
2026-04-30 3:42 ` kernel test robot
@ 2026-04-30 14:40 ` kernel test robot
2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2026-04-30 14:40 UTC (permalink / raw)
To: Aniket Randive, gregkh, jirislaby, linux-arm-msm, linux-kernel,
linux-serial, praveen.talari, anup.kulkarni, dmitry.baryshkov,
viken.dadhaniya
Cc: oe-kbuild-all, Aniket Randive
Hi Aniket,
kernel test robot noticed the following build warnings:
[auto build test WARNING on tty/tty-testing]
[also build test WARNING on tty/tty-next tty/tty-linus usb/usb-testing usb/usb-next usb/usb-linus linus/master v7.1-rc1 next-20260429]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Aniket-Randive/serial-qcom-geni-Avoid-probing-debug-console-UART-without-console-support/20260423-150710
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-testing
patch link: https://lore.kernel.org/r/20260413072501.263871-1-aniket.randive%40oss.qualcomm.com
patch subject: [PATCH v1] serial: qcom-geni: Avoid probing debug console UART without console support
config: csky-randconfig-001-20260430 (https://download.01.org/0day-ci/archive/20260430/202604302204.1qhU6zO5-lkp@intel.com/config)
compiler: csky-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260430/202604302204.1qhU6zO5-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604302204.1qhU6zO5-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/tty/serial/qcom_geni_serial.c:2011:43: warning: 'sa8255p_qcom_geni_console_data' defined but not used [-Wunused-const-variable=]
2011 | static const struct qcom_geni_device_data sa8255p_qcom_geni_console_data = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/tty/serial/qcom_geni_serial.c:1995:43: warning: 'qcom_geni_console_data' defined but not used [-Wunused-const-variable=]
1995 | static const struct qcom_geni_device_data qcom_geni_console_data = {
| ^~~~~~~~~~~~~~~~~~~~~~
vim +/sa8255p_qcom_geni_console_data +2011 drivers/tty/serial/qcom_geni_serial.c
c4f528795d1add Karthikeyan Ramasubramanian 2018-03-14 1994
40ec6d41c841e2 Bartosz Golaszewski 2022-12-29 @1995 static const struct qcom_geni_device_data qcom_geni_console_data = {
40ec6d41c841e2 Bartosz Golaszewski 2022-12-29 1996 .console = true,
2aaa43c7077833 Bartosz Golaszewski 2022-12-29 1997 .mode = GENI_SE_FIFO,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 1998 .resources_init = geni_serial_resource_init,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 1999 .set_rate = geni_serial_set_rate,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2000 .power_state = geni_serial_resource_state,
40ec6d41c841e2 Bartosz Golaszewski 2022-12-29 2001 };
40ec6d41c841e2 Bartosz Golaszewski 2022-12-29 2002
40ec6d41c841e2 Bartosz Golaszewski 2022-12-29 2003 static const struct qcom_geni_device_data qcom_geni_uart_data = {
40ec6d41c841e2 Bartosz Golaszewski 2022-12-29 2004 .console = false,
2aaa43c7077833 Bartosz Golaszewski 2022-12-29 2005 .mode = GENI_SE_DMA,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2006 .resources_init = geni_serial_resource_init,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2007 .set_rate = geni_serial_set_rate,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2008 .power_state = geni_serial_resource_state,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2009 };
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2010
abffd1e6c4f1c9 Praveen Talari 2025-11-10 @2011 static const struct qcom_geni_device_data sa8255p_qcom_geni_console_data = {
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2012 .console = true,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2013 .mode = GENI_SE_FIFO,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2014 .pd_data = {
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2015 .pd_flags = PD_FLAG_DEV_LINK_ON,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2016 .pd_names = (const char*[]) { "power", "perf" },
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2017 .num_pd_names = 2,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2018 },
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2019 .resources_init = geni_serial_pwr_init,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2020 .set_rate = geni_serial_set_level,
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2021 };
abffd1e6c4f1c9 Praveen Talari 2025-11-10 2022
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-04-30 14:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-13 7:25 [PATCH v1] serial: qcom-geni: Avoid probing debug console UART without console support Aniket Randive
2026-04-27 9:18 ` Praveen Talari
2026-04-30 3:42 ` kernel test robot
2026-04-30 14:40 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox