Swatantra-66 commented on code in PR #21047:
URL: https://github.com/apache/nuttx/pull/21047#discussion_r4403304365


##########
drivers/serial/serial.c:
##########
@@ -177,10 +181,12 @@ static const struct file_operations g_serialops =
   NULL,         /* mmap */
   NULL,         /* truncate */
   uart_poll,    /* poll */
+#ifdef CONFIG_FS_UIO

Review Comment:
   In configurations where CONFIG_SERIAL is disabled (for example, 
nucleo-f303re:can, stm32f4discovery:lwl, qemu-intel64:earlyfb), CONFIG_FS_UIO 
is not selected. 
   However, drivers/serial/Make.defs currently includes serial.c 
unconditionally (CSRCS += serial.c serial_io.c). When CONFIG_FS_UIO is not 
defined in those configs, struct file_operations omits readv and writev, 
causing serial.c to fail in CI with: error: excess elements in struct 
initializer
   
   Would you prefer:
   Gating serial.c and serial_io.c on CONFIG_SERIAL in drivers/serial/Make.defs 
and CMakeLists.txt so serial.c is only compiled when CONFIG_SERIAL=y, or
   Keeping the #ifdef CONFIG_FS_UIO guards inside serial.c?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to