diff --git a/Documentation/reference/os/arch.rst b/Documentation/reference/os/arch.rst index 1fd49f1fc4..8afe4bcb48 100644 --- a/Documentation/reference/os/arch.rst +++ b/Documentation/reference/os/arch.rst @@ -288,7 +288,7 @@ APIs Exported by Architecture-Specific Logic to NuttX architectures, it should be avoided in common implementations where possible. -.. c:function:: int up_putc(int ch) +.. c:function:: void up_putc(int ch) This is a debug interface exported by the architecture-specific logic. Output one character on the console diff --git a/arch/arm/src/a1x/a1x_serial.c b/arch/arm/src/a1x/a1x_serial.c index bd7faf265d..7ffd1820c4 100644 --- a/arch/arm/src/a1x/a1x_serial.c +++ b/arch/arm/src/a1x/a1x_serial.c @@ -1566,7 +1566,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -1578,8 +1578,6 @@ int up_putc(int ch) #ifdef HAVE_SERIAL_CONSOLE up_restoreuartint(priv, ier); #endif - - return ch; } #else /* USE_SERIALDRIVER */ @@ -1592,12 +1590,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART_DEVICE arm_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/am335x/am335x_serial.c b/arch/arm/src/am335x/am335x_serial.c index f937709820..8ec878fb01 100644 --- a/arch/arm/src/am335x/am335x_serial.c +++ b/arch/arm/src/am335x/am335x_serial.c @@ -1370,7 +1370,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -1382,8 +1382,6 @@ int up_putc(int ch) #ifdef HAVE_SERIAL_CONSOLE up_restoreuartint(priv, ier); #endif - - return ch; } #else /* USE_SERIALDRIVER */ @@ -1396,12 +1394,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART_DEVICE arm_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/at32/at32_serial.c b/arch/arm/src/at32/at32_serial.c index e2018e48cd..c73457d085 100644 --- a/arch/arm/src/at32/at32_serial.c +++ b/arch/arm/src/at32/at32_serial.c @@ -2997,7 +2997,7 @@ void at32_serial_dma_poll(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_UART > 0 struct up_dev_s *priv = g_uart_devs[CONSOLE_UART - 1]; @@ -3007,7 +3007,6 @@ int up_putc(int ch) arm_lowputc(ch); up_restoreusartint(priv, ie); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -3020,12 +3019,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_UART > 0 arm_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/c5471/c5471_serial.c b/arch/arm/src/c5471/c5471_serial.c index 0165210284..788bbebd8a 100644 --- a/arch/arm/src/c5471/c5471_serial.c +++ b/arch/arm/src/c5471/c5471_serial.c @@ -830,7 +830,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; uint16_t ier; @@ -841,5 +841,4 @@ int up_putc(int ch) up_waittxready(priv); up_restoreuartint(priv, ier); - return ch; } diff --git a/arch/arm/src/common/arm_semi_syslog.c b/arch/arm/src/common/arm_semi_syslog.c index 43562db01d..530b346861 100644 --- a/arch/arm/src/common/arm_semi_syslog.c +++ b/arch/arm/src/common/arm_semi_syslog.c @@ -45,10 +45,9 @@ * Name: up_putc ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { smh_call(SEMI_SYSLOG_WRITEC, &ch); - return ch; } /**************************************************************************** diff --git a/arch/arm/src/cxd32xx/cxd32_serial.c b/arch/arm/src/cxd32xx/cxd32_serial.c index 384a9d26de..5642b0cb78 100644 --- a/arch/arm/src/cxd32xx/cxd32_serial.c +++ b/arch/arm/src/cxd32xx/cxd32_serial.c @@ -970,7 +970,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_CONSOLE struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -982,8 +982,6 @@ int up_putc(int ch) #ifdef HAVE_CONSOLE up_restoreuartint(priv, ier); #endif - - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/cxd56xx/cxd56_serial.c b/arch/arm/src/cxd56xx/cxd56_serial.c index f73f054c49..eadb023808 100644 --- a/arch/arm/src/cxd56xx/cxd56_serial.c +++ b/arch/arm/src/cxd56xx/cxd56_serial.c @@ -1108,7 +1108,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_CONSOLE struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -1120,8 +1120,6 @@ int up_putc(int ch) #ifdef HAVE_CONSOLE up_restoreuartint(priv, ier); #endif - - return ch; } #else /* USE_SERIALDRIVER */ @@ -1134,12 +1132,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART arm_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/dm320/dm320_serial.c b/arch/arm/src/dm320/dm320_serial.c index 2bc8dbdb77..8f150dfb30 100644 --- a/arch/arm/src/dm320/dm320_serial.c +++ b/arch/arm/src/dm320/dm320_serial.c @@ -742,7 +742,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; uint16_t ier; @@ -753,7 +753,6 @@ int up_putc(int ch) up_waittxready(priv); up_restoreuartint(priv, ier); - return ch; } #else /* USE_SERIALDRIVER */ @@ -789,13 +788,12 @@ static inline void up_waittxready(void) * Public Functions ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { up_waittxready(); putreg16((uint16_t)ch, DM320_REGISTER_BASE + UART_DTRR); up_waittxready(); - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/efm32/efm32_leserial.c b/arch/arm/src/efm32/efm32_leserial.c index 4af6c30373..fe80a0410a 100644 --- a/arch/arm/src/efm32/efm32_leserial.c +++ b/arch/arm/src/efm32/efm32_leserial.c @@ -809,7 +809,7 @@ void arm_serialinit(void) ****************************************************************************/ #ifdef HAVE_LEUART_CONSOLE -int up_putc(int ch) +void up_putc(int ch) { struct efm32_leuart_s *priv = (struct efm32_leuart_s *)CONSOLE_DEV.priv; uint32_t ien; @@ -817,7 +817,6 @@ int up_putc(int ch) efm32_disableuartint(priv, &ien); efm32_lowputc(ch); efm32_restoreuartint(priv, ien); - return ch; } #endif @@ -832,10 +831,9 @@ int up_putc(int ch) ****************************************************************************/ #ifdef HAVE_LEUART_CONSOLE -int up_putc(int ch) +void up_putc(int ch) { efm32_lowputc(ch); - return ch; } #endif diff --git a/arch/arm/src/efm32/efm32_serial.c b/arch/arm/src/efm32/efm32_serial.c index 7dc45cec1f..522add0825 100644 --- a/arch/arm/src/efm32/efm32_serial.c +++ b/arch/arm/src/efm32/efm32_serial.c @@ -1185,7 +1185,7 @@ void arm_serialinit(void) ****************************************************************************/ #ifndef HAVE_LEUART_CONSOLE -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART_CONSOLE struct efm32_usart_s *priv = (struct efm32_usart_s *)CONSOLE_DEV.priv; @@ -1195,7 +1195,6 @@ int up_putc(int ch) efm32_lowputc(ch); efm32_restoreuartint(priv, ien); #endif - return ch; } #endif @@ -1210,12 +1209,11 @@ int up_putc(int ch) ****************************************************************************/ #ifndef HAVE_LEUART_CONSOLE -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART_CONSOLE efm32_lowputc(ch); #endif - return ch; } #endif diff --git a/arch/arm/src/eoss3/eoss3_serial.c b/arch/arm/src/eoss3/eoss3_serial.c index e4ab6393d0..20a277b096 100644 --- a/arch/arm/src/eoss3/eoss3_serial.c +++ b/arch/arm/src/eoss3/eoss3_serial.c @@ -581,7 +581,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef CONFIG_UART_SERIAL_CONSOLE struct eoss3_uart_s *priv = (struct eoss3_uart_s *)g_uartport.priv; @@ -591,8 +591,6 @@ int up_putc(int ch) arm_lowputc(ch); eoss3_restoreuartint(priv, ie); #endif - - return ch; } #else /* USE_SERIALDRIVER */ @@ -605,12 +603,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { /* Output the character */ arm_lowputc(ch); - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/fvp-v8r-aarch32/fvp_serial.c b/arch/arm/src/fvp-v8r-aarch32/fvp_serial.c index 677f9ae2bc..12ed7f4d99 100644 --- a/arch/arm/src/fvp-v8r-aarch32/fvp_serial.c +++ b/arch/arm/src/fvp-v8r-aarch32/fvp_serial.c @@ -78,9 +78,8 @@ void arm_serialinit(void) #else /* USE_SERIALDRIVER */ -int up_putc(int ch) +void up_putc(int ch) { - return 0; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/gd32f4/gd32f4xx_serial.c b/arch/arm/src/gd32f4/gd32f4xx_serial.c index 334fefe889..9d131c0b10 100644 --- a/arch/arm/src/gd32f4/gd32f4xx_serial.c +++ b/arch/arm/src/gd32f4/gd32f4xx_serial.c @@ -2929,7 +2929,7 @@ void gd32_serial_dma_poll(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef CONSOLE_UART @@ -2940,7 +2940,6 @@ int up_putc(int ch) arm_lowputc(ch); up_restoreusartint(priv, ie); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -2953,12 +2952,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef CONSOLE_UART arm_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/imx1/imx_serial.c b/arch/arm/src/imx1/imx_serial.c index 701d231ae0..e87f87660a 100644 --- a/arch/arm/src/imx1/imx_serial.c +++ b/arch/arm/src/imx1/imx_serial.c @@ -1158,7 +1158,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; uint32_t ier; @@ -1169,7 +1169,6 @@ int up_putc(int ch) up_serialout(priv, UART_TXD0, (uint32_t)ch); up_waittxready(priv); up_restoreuartint(priv, ier); - return ch; } #else /* USE_SERIALDRIVER */ @@ -1211,11 +1210,10 @@ static inline void up_waittxready(void) * Public Functions ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { up_waittxready(); putreg32((uint16_t)ch, IMX_REGISTER_BASE + UART_TXD0); - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/imx6/imx_serial.c b/arch/arm/src/imx6/imx_serial.c index cfca29fe07..903b802bfa 100644 --- a/arch/arm/src/imx6/imx_serial.c +++ b/arch/arm/src/imx6/imx_serial.c @@ -1114,7 +1114,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { struct imx_uart_s *priv = (struct imx_uart_s *)CONSOLE_DEV.priv; uint32_t ier; @@ -1126,8 +1126,6 @@ int up_putc(int ch) imx_disableuartint(priv, &ier); imx_lowputc(ch); imx_restoreuartint(priv, ier); - - return ch; } #else /* USE_SERIALDRIVER */ @@ -1176,14 +1174,12 @@ static inline void imx_waittxready(void) * Public Functions ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef IMX_CONSOLE_VBASE imx_waittxready(); putreg32((uint16_t)ch, IMX_CONSOLE_VBASE + UART_TXD_OFFSET); #endif - - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/imxrt/imxrt_serial.c b/arch/arm/src/imxrt/imxrt_serial.c index d87790f68b..c0f19f2f54 100644 --- a/arch/arm/src/imxrt/imxrt_serial.c +++ b/arch/arm/src/imxrt/imxrt_serial.c @@ -3671,7 +3671,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef CONSOLE_DEV struct imxrt_uart_s *priv = (struct imxrt_uart_s *)CONSOLE_DEV.dev.priv; @@ -3681,8 +3681,6 @@ int up_putc(int ch) imxrt_lowputc(ch); imxrt_restoreuartint(priv, ie); #endif - - return ch; } #else /* USE_SERIALDRIVER */ @@ -3695,13 +3693,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_LPUART > 0 arm_lowputc(ch); #endif - - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/kinetis/kinetis_lpserial.c b/arch/arm/src/kinetis/kinetis_lpserial.c index a4cf3a3545..1893851bef 100644 --- a/arch/arm/src/kinetis/kinetis_lpserial.c +++ b/arch/arm/src/kinetis/kinetis_lpserial.c @@ -1949,7 +1949,7 @@ void kinetis_lpserial_dma_poll(void) ****************************************************************************/ #ifdef HAVE_LPUART_PUTC -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_LPUART_CONSOLE struct kinetis_dev_s *priv = (struct kinetis_dev_s *)CONSOLE_DEV.priv; @@ -1959,7 +1959,6 @@ int up_putc(int ch) arm_lowputc(ch); kinetis_restoreuartint(priv, ie); #endif - return ch; } #endif @@ -1974,12 +1973,11 @@ int up_putc(int ch) ****************************************************************************/ #ifdef HAVE_LPUART_PUTC -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_LPUART_CONSOLE arm_lowputc(ch); #endif - return ch; } #endif diff --git a/arch/arm/src/kinetis/kinetis_serial.c b/arch/arm/src/kinetis/kinetis_serial.c index d7a3edd242..38fdb6337f 100644 --- a/arch/arm/src/kinetis/kinetis_serial.c +++ b/arch/arm/src/kinetis/kinetis_serial.c @@ -2141,7 +2141,7 @@ void kinetis_serial_dma_poll(void) ****************************************************************************/ #ifdef HAVE_UART_PUTC -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART_CONSOLE struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -2151,7 +2151,6 @@ int up_putc(int ch) arm_lowputc(ch); up_restoreuartint(priv, ie); #endif - return ch; } #endif @@ -2166,12 +2165,11 @@ int up_putc(int ch) ****************************************************************************/ #ifdef HAVE_UART_PUTC -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART_CONSOLE arm_lowputc(ch); #endif - return ch; } #endif diff --git a/arch/arm/src/kl/kl_serial.c b/arch/arm/src/kl/kl_serial.c index 9afe34d9bf..e9f759b09e 100644 --- a/arch/arm/src/kl/kl_serial.c +++ b/arch/arm/src/kl/kl_serial.c @@ -875,7 +875,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -885,7 +885,6 @@ int up_putc(int ch) kl_lowputc(ch); up_restoreuartint(priv, ie); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -898,12 +897,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE kl_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/lc823450/lc823450_serial.c b/arch/arm/src/lc823450/lc823450_serial.c index a767768f5c..54fe1bc934 100644 --- a/arch/arm/src/lc823450/lc823450_serial.c +++ b/arch/arm/src/lc823450/lc823450_serial.c @@ -1358,7 +1358,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; uint32_t im; @@ -1366,7 +1366,7 @@ int up_putc(int ch) #ifdef CONFIG_DEV_CONSOLE_SWITCH if (g_console_disable) { - return ch; + return; } #endif /* CONFIG_DEV_CONSOLE_SWITCH */ @@ -1376,7 +1376,6 @@ int up_putc(int ch) up_waittxnotfull(priv); up_restoreuartint(priv, im); - return ch; } #else /* USE_SERIALDRIVER */ @@ -1389,10 +1388,9 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { arm_lowputc(ch); - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_serial.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_serial.c index 3216721f22..1397e4b382 100644 --- a/arch/arm/src/lpc17xx_40xx/lpc17_40_serial.c +++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_serial.c @@ -1684,7 +1684,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_CONSOLE struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -1696,8 +1696,6 @@ int up_putc(int ch) #ifdef HAVE_CONSOLE up_restoreuartint(priv, ier); #endif - - return ch; } #else /* USE_SERIALDRIVER */ @@ -1710,12 +1708,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART arm_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/lpc214x/lpc214x_serial.c b/arch/arm/src/lpc214x/lpc214x_serial.c index 22807163df..1b64a1370b 100644 --- a/arch/arm/src/lpc214x/lpc214x_serial.c +++ b/arch/arm/src/lpc214x/lpc214x_serial.c @@ -783,7 +783,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; uint8_t ier; @@ -794,7 +794,6 @@ int up_putc(int ch) up_waittxready(priv); up_restoreuartint(priv, ier); - return ch; } #else /* USE_SERIALDRIVER */ @@ -807,10 +806,9 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { arm_lowputc(ch); - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/lpc2378/lpc23xx_serial.c b/arch/arm/src/lpc2378/lpc23xx_serial.c index 66fcd842b6..c49cc1b1fb 100644 --- a/arch/arm/src/lpc2378/lpc23xx_serial.c +++ b/arch/arm/src/lpc2378/lpc23xx_serial.c @@ -923,7 +923,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; uint8_t ier; @@ -934,7 +934,6 @@ int up_putc(int ch) up_waittxready(priv); up_restoreuartint(priv, ier); - return ch; } #else /* USE_SERIALDRIVER */ @@ -947,9 +946,8 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { arm_lowputc(ch); - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/lpc31xx/lpc31_serial.c b/arch/arm/src/lpc31xx/lpc31_serial.c index 9ffc996ca3..6477abc3bc 100644 --- a/arch/arm/src/lpc31xx/lpc31_serial.c +++ b/arch/arm/src/lpc31xx/lpc31_serial.c @@ -797,7 +797,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { struct up_dev_s *priv = &g_uartpriv; uint8_t ier; @@ -812,7 +812,6 @@ int up_putc(int ch) arm_lowputc(ch); up_restoreuartint(priv, ier); - return ch; } #else /* USE_SERIALDRIVER */ @@ -825,12 +824,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { /* Output the character */ arm_lowputc(ch); - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/lpc43xx/lpc43_serial.c b/arch/arm/src/lpc43xx/lpc43_serial.c index e53b924784..279cddafe0 100644 --- a/arch/arm/src/lpc43xx/lpc43_serial.c +++ b/arch/arm/src/lpc43xx/lpc43_serial.c @@ -1348,7 +1348,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -1360,8 +1360,6 @@ int up_putc(int ch) #ifdef HAVE_SERIAL_CONSOLE up_restoreuartint(priv, ier); #endif - - return ch; } #else /* USE_SERIALDRIVER */ @@ -1374,12 +1372,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART arm_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/lpc54xx/lpc54_serial.c b/arch/arm/src/lpc54xx/lpc54_serial.c index 81d6fe8ed8..c17a2e4ee7 100644 --- a/arch/arm/src/lpc54xx/lpc54_serial.c +++ b/arch/arm/src/lpc54xx/lpc54_serial.c @@ -1440,7 +1440,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_USART_CONSOLE struct lpc54_dev_s *priv = (struct lpc54_dev_s *)CONSOLE_DEV.priv; @@ -1450,8 +1450,6 @@ int up_putc(int ch) arm_lowputc(ch); lpc54_fifoint_enable(priv, intset); #endif - - return ch; } #else /* USE_SERIALDRIVER */ @@ -1464,11 +1462,10 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_USART_CONSOLE arm_lowputc(ch); - return ch; } #endif diff --git a/arch/arm/src/max326xx/max32660/max32660_serial.c b/arch/arm/src/max326xx/max32660/max32660_serial.c index 43573db43f..e4e1265e25 100644 --- a/arch/arm/src/max326xx/max32660/max32660_serial.c +++ b/arch/arm/src/max326xx/max32660/max32660_serial.c @@ -825,7 +825,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART_CONSOLE struct max326_dev_s *priv = (struct max326_dev_s *)CONSOLE_DEV.priv; @@ -835,8 +835,6 @@ int up_putc(int ch) arm_lowputc(ch); max326_int_enable(priv, intset); #endif - - return ch; } #else /* USE_SERIALDRIVER */ @@ -849,11 +847,10 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART_CONSOLE arm_lowputc(ch); - return ch; } #endif diff --git a/arch/arm/src/mx8mp/mx8mp_serial.c b/arch/arm/src/mx8mp/mx8mp_serial.c index 587997c411..ba54e5caf4 100644 --- a/arch/arm/src/mx8mp/mx8mp_serial.c +++ b/arch/arm/src/mx8mp/mx8mp_serial.c @@ -1051,7 +1051,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART_CONSOLE struct mx8mp_uart_s *priv = (struct mx8mp_uart_s *)CONSOLE_DEV.priv; @@ -1065,8 +1065,6 @@ int up_putc(int ch) arm_lowputc(ch); mx8mp_restoreuartint(priv, ier); #endif - - return ch; } #else /* USE_SERIALDRIVER */ @@ -1113,14 +1111,12 @@ static inline void mx8mp_waittxready(void) * Public Functions ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef MX8MP_CONSOLE mx8mp_waittxready(); putreg32((uint16_t)ch, MX8MP_CONSOLE + UART_TXD_OFFSET); #endif - - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/nrf52/nrf52_serial.c b/arch/arm/src/nrf52/nrf52_serial.c index de7b42b27a..b667be09f5 100644 --- a/arch/arm/src/nrf52/nrf52_serial.c +++ b/arch/arm/src/nrf52/nrf52_serial.c @@ -812,15 +812,13 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART_CONSOLE /* struct nrf52_dev_s *priv = (struct nrf52_dev_s *)CONSOLE_DEV.priv; */ arm_lowputc(ch); #endif - - return ch; } #else /* USE_SERIALDRIVER */ @@ -833,12 +831,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART_CONSOLE arm_lowputc(ch); #endif - return ch; } #endif /* HAVE_UART_DEVICE && USE_SERIALDRIVER */ diff --git a/arch/arm/src/nrf53/nrf53_serial.c b/arch/arm/src/nrf53/nrf53_serial.c index a5b478a297..7cb5983493 100644 --- a/arch/arm/src/nrf53/nrf53_serial.c +++ b/arch/arm/src/nrf53/nrf53_serial.c @@ -812,15 +812,13 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART_CONSOLE /* struct nrf53_dev_s *priv = (struct nrf53_dev_s *)CONSOLE_DEV.priv; */ arm_lowputc(ch); #endif - - return ch; } #else /* USE_SERIALDRIVER */ @@ -833,12 +831,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART_CONSOLE arm_lowputc(ch); #endif - return ch; } #endif /* HAVE_UART_DEVICE && USE_SERIALDRIVER */ diff --git a/arch/arm/src/nrf91/nrf91_serial.c b/arch/arm/src/nrf91/nrf91_serial.c index adcbb433f9..1e9c39b169 100644 --- a/arch/arm/src/nrf91/nrf91_serial.c +++ b/arch/arm/src/nrf91/nrf91_serial.c @@ -812,15 +812,13 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART_CONSOLE /* struct nrf91_dev_s *priv = (struct nrf91_dev_s *)CONSOLE_DEV.priv; */ arm_lowputc(ch); #endif - - return ch; } #else /* USE_SERIALDRIVER */ @@ -833,12 +831,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART_CONSOLE arm_lowputc(ch); #endif - return ch; } #endif /* HAVE_UART_DEVICE && USE_SERIALDRIVER */ diff --git a/arch/arm/src/nuc1xx/nuc_serial.c b/arch/arm/src/nuc1xx/nuc_serial.c index ac9657fd89..0659a05c9f 100644 --- a/arch/arm/src/nuc1xx/nuc_serial.c +++ b/arch/arm/src/nuc1xx/nuc_serial.c @@ -1049,7 +1049,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_CONSOLE struct nuc_dev_s *priv = (struct nuc_dev_s *)CONSOLE_DEV.priv; @@ -1061,8 +1061,6 @@ int up_putc(int ch) #ifdef HAVE_CONSOLE up_restoreuartint(priv, ier); #endif - - return ch; } #else /* USE_SERIALDRIVER && HAVE_UART */ @@ -1075,12 +1073,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART nuc_lowputc((uint32_t)ch); #endif - return ch; } #endif /* USE_SERIALDRIVER && HAVE_UART */ diff --git a/arch/arm/src/phy62xx/uart.c b/arch/arm/src/phy62xx/uart.c index 1765bd13ec..e9a6e3fb8d 100644 --- a/arch/arm/src/phy62xx/uart.c +++ b/arch/arm/src/phy62xx/uart.c @@ -1127,10 +1127,9 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { hal_uart_send_byte(UART0, (char)ch); - return ch; } struct h4uart_param_s diff --git a/arch/arm/src/rp2040/rp2040_serial.c b/arch/arm/src/rp2040/rp2040_serial.c index d0c9ec7465..072f6274ad 100644 --- a/arch/arm/src/rp2040/rp2040_serial.c +++ b/arch/arm/src/rp2040/rp2040_serial.c @@ -1015,7 +1015,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_CONSOLE struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -1026,8 +1026,6 @@ int up_putc(int ch) #ifdef HAVE_CONSOLE up_restoreuartint(priv, ier); #endif - - return ch; } #else /* USE_SERIALDRIVER */ @@ -1040,12 +1038,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART arm_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/rtl8720c/ameba_uart.c b/arch/arm/src/rtl8720c/ameba_uart.c index 2b26791e4a..c63899d0ec 100644 --- a/arch/arm/src/rtl8720c/ameba_uart.c +++ b/arch/arm/src/rtl8720c/ameba_uart.c @@ -1074,12 +1074,11 @@ void arm_serialinit(void) ****************************************************************************/ #ifdef HAVE_AMEBA_CONSOLE -int up_putc(int ch) +void up_putc(int ch) { struct ameba_s *priv = (struct ameba_s *)CONSOLE_DEV.priv; ameba_putc(priv, ch); - return ch; } #endif diff --git a/arch/arm/src/s32k1xx/s32k1xx_serial.c b/arch/arm/src/s32k1xx/s32k1xx_serial.c index c023b810c8..4716e15817 100644 --- a/arch/arm/src/s32k1xx/s32k1xx_serial.c +++ b/arch/arm/src/s32k1xx/s32k1xx_serial.c @@ -2544,7 +2544,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef CONSOLE_DEV struct s32k1xx_uart_s *priv = @@ -2555,8 +2555,6 @@ int up_putc(int ch) s32k1xx_lowputc(ch); s32k1xx_restoreuartint(priv, ie); #endif - - return ch; } #else /* USE_SERIALDRIVER */ @@ -2569,13 +2567,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_LPUART > 0 arm_lowputc(ch); #endif - - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/s32k3xx/s32k3xx_serial.c b/arch/arm/src/s32k3xx/s32k3xx_serial.c index edf05ffefc..8d44f460e3 100644 --- a/arch/arm/src/s32k3xx/s32k3xx_serial.c +++ b/arch/arm/src/s32k3xx/s32k3xx_serial.c @@ -4453,7 +4453,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef CONSOLE_DEV struct s32k3xx_uart_s *priv = (struct s32k3xx_uart_s *)&CONSOLE_DEV; @@ -4463,8 +4463,6 @@ int up_putc(int ch) s32k3xx_lowputc(ch); s32k3xx_restoreuartint(priv, ie); #endif - - return ch; } #else /* USE_SERIALDRIVER */ @@ -4477,13 +4475,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_LPUART > 0 arm_lowputc(ch); #endif - - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/sam34/sam_lowputc.c b/arch/arm/src/sam34/sam_lowputc.c index c381d067df..e6f5a19791 100644 --- a/arch/arm/src/sam34/sam_lowputc.c +++ b/arch/arm/src/sam34/sam_lowputc.c @@ -303,12 +303,11 @@ void arm_lowputc(char ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_CONSOLE arm_lowputc(ch); #endif - return ch; } /**************************************************************************** diff --git a/arch/arm/src/sama5/sam_lowputc.c b/arch/arm/src/sama5/sam_lowputc.c index 0efe8bd41b..e2fa599f50 100644 --- a/arch/arm/src/sama5/sam_lowputc.c +++ b/arch/arm/src/sama5/sam_lowputc.c @@ -315,14 +315,13 @@ void arm_lowputc(char ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if defined(SAMA5_HAVE_UART_CONSOLE) || defined(SAMA5_HAVE_USART_CONSOLE) || \ defined(SAMA5_HAVE_FLEXCOM_CONSOLE) || defined(CONFIG_SAMA5_DBGU_CONSOLE) arm_lowputc(ch); #endif - return ch; } /**************************************************************************** diff --git a/arch/arm/src/samd2l2/sam_serial.c b/arch/arm/src/samd2l2/sam_serial.c index 67e32de58a..e9ee18b1bc 100644 --- a/arch/arm/src/samd2l2/sam_serial.c +++ b/arch/arm/src/samd2l2/sam_serial.c @@ -1037,7 +1037,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE irqstate_t flags; @@ -1050,7 +1050,6 @@ int up_putc(int ch) sam_lowputc(ch); spin_unlock_irqrestore(NULL, flags); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -1063,12 +1062,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE sam_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/samd5e5/sam_serial.c b/arch/arm/src/samd5e5/sam_serial.c index 0376ccaa6d..f96feec0f1 100644 --- a/arch/arm/src/samd5e5/sam_serial.c +++ b/arch/arm/src/samd5e5/sam_serial.c @@ -1096,7 +1096,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE irqstate_t flags; @@ -1109,7 +1109,6 @@ int up_putc(int ch) sam_lowputc(ch); spin_unlock_irqrestore(NULL, flags); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -1122,12 +1121,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE sam_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/samv7/sam_lowputc.c b/arch/arm/src/samv7/sam_lowputc.c index 3f512313c0..717662820f 100644 --- a/arch/arm/src/samv7/sam_lowputc.c +++ b/arch/arm/src/samv7/sam_lowputc.c @@ -209,12 +209,11 @@ void arm_lowputc(char ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE arm_lowputc(ch); #endif - return ch; } /**************************************************************************** diff --git a/arch/arm/src/stm32/stm32_serial.c b/arch/arm/src/stm32/stm32_serial.c index b7094a7383..5f53144514 100644 --- a/arch/arm/src/stm32/stm32_serial.c +++ b/arch/arm/src/stm32/stm32_serial.c @@ -3627,7 +3627,7 @@ void stm32_serial_dma_poll(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_UART > 0 struct up_dev_s *priv = g_uart_devs[CONSOLE_UART - 1]; @@ -3642,7 +3642,6 @@ int up_putc(int ch) arm_lowputc(ch); up_restoreusartint(priv, ie); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -3655,12 +3654,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_UART > 0 || CONSOLE_LPUART > 0 arm_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/stm32f0l0g0/stm32_serial_v1.c b/arch/arm/src/stm32f0l0g0/stm32_serial_v1.c index 16915dd733..7bb31b5dad 100644 --- a/arch/arm/src/stm32f0l0g0/stm32_serial_v1.c +++ b/arch/arm/src/stm32f0l0g0/stm32_serial_v1.c @@ -2574,7 +2574,7 @@ void stm32serial_dmapoll(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_USART > 0 struct stm32_serial_s *priv = g_uart_devs[CONSOLE_USART - 1]; @@ -2584,7 +2584,6 @@ int up_putc(int ch) arm_lowputc(ch); stm32serial_restoreusartint(priv, ie); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -2597,13 +2596,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_USART > 0 arm_lowputc(ch); #endif - - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/stm32f0l0g0/stm32_serial_v2.c b/arch/arm/src/stm32f0l0g0/stm32_serial_v2.c index 2b2d8ff601..6ccc4ad553 100644 --- a/arch/arm/src/stm32f0l0g0/stm32_serial_v2.c +++ b/arch/arm/src/stm32f0l0g0/stm32_serial_v2.c @@ -2007,7 +2007,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_USART > 0 struct up_dev_s *priv = g_uart_devs[CONSOLE_USART - 1]; @@ -2018,7 +2018,6 @@ int up_putc(int ch) up_restoreusartint(priv, ie); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -2031,12 +2030,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_USART > 0 arm_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/stm32f7/stm32_serial.c b/arch/arm/src/stm32f7/stm32_serial.c index 0d1716f688..894a0e48bb 100644 --- a/arch/arm/src/stm32f7/stm32_serial.c +++ b/arch/arm/src/stm32f7/stm32_serial.c @@ -3792,7 +3792,7 @@ void stm32_serial_dma_poll(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_UART > 0 struct up_dev_s *priv = g_uart_devs[CONSOLE_UART - 1]; @@ -3802,7 +3802,6 @@ int up_putc(int ch) arm_lowputc(ch); up_restoreusartint(priv, ie); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -3815,12 +3814,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_UART > 0 arm_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/stm32h7/stm32_serial.c b/arch/arm/src/stm32h7/stm32_serial.c index f799aeaec6..164aef0276 100644 --- a/arch/arm/src/stm32h7/stm32_serial.c +++ b/arch/arm/src/stm32h7/stm32_serial.c @@ -4001,7 +4001,7 @@ void stm32_serial_dma_poll(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_UART > 0 struct up_dev_s *priv = g_uart_devs[CONSOLE_UART - 1]; @@ -4012,7 +4012,6 @@ int up_putc(int ch) up_restoreusartint(priv, ie); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -4025,12 +4024,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_UART > 0 arm_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/stm32l4/stm32l4_serial.c b/arch/arm/src/stm32l4/stm32l4_serial.c index 0b068d03b4..8e030d02ee 100644 --- a/arch/arm/src/stm32l4/stm32l4_serial.c +++ b/arch/arm/src/stm32l4/stm32l4_serial.c @@ -3261,7 +3261,7 @@ void stm32l4_serial_dma_poll(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_UART > 0 struct stm32l4_serial_s *priv = g_uart_devs[CONSOLE_UART - 1]; @@ -3271,7 +3271,6 @@ int up_putc(int ch) arm_lowputc(ch); stm32l4serial_restoreusartint(priv, ie); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -3284,12 +3283,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_UART > 0 arm_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/stm32l5/stm32l5_serial.c b/arch/arm/src/stm32l5/stm32l5_serial.c index 2a518d29e4..960b29db45 100644 --- a/arch/arm/src/stm32l5/stm32l5_serial.c +++ b/arch/arm/src/stm32l5/stm32l5_serial.c @@ -3194,7 +3194,7 @@ void stm32l5_serial_dma_poll(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_UART > 0 struct stm32l5_serial_s *priv = g_uart_devs[CONSOLE_UART - 1]; @@ -3204,7 +3204,6 @@ int up_putc(int ch) arm_lowputc(ch); stm32l5serial_restoreusartint(priv, ie); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -3217,12 +3216,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_UART > 0 arm_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/stm32u5/stm32_serial.c b/arch/arm/src/stm32u5/stm32_serial.c index e642224d26..b5ddb511a6 100644 --- a/arch/arm/src/stm32u5/stm32_serial.c +++ b/arch/arm/src/stm32u5/stm32_serial.c @@ -3194,7 +3194,7 @@ void stm32_serial_dma_poll(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_UART > 0 struct stm32_serial_s *priv = g_uart_devs[CONSOLE_UART - 1]; @@ -3204,7 +3204,6 @@ int up_putc(int ch) arm_lowputc(ch); stm32serial_restoreusartint(priv, ie); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -3217,12 +3216,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_UART > 0 arm_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/stm32wb/stm32wb_serial.c b/arch/arm/src/stm32wb/stm32wb_serial.c index f6d614a9ea..69804719e7 100644 --- a/arch/arm/src/stm32wb/stm32wb_serial.c +++ b/arch/arm/src/stm32wb/stm32wb_serial.c @@ -2827,7 +2827,7 @@ void stm32wb_serial_dma_poll(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_UART > 0 struct stm32wb_serial_s *priv = g_uart_devs[CONSOLE_UART - 1]; @@ -2837,7 +2837,6 @@ int up_putc(int ch) arm_lowputc(ch); stm32wb_serial_restoreusartint(priv, ie); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -2850,12 +2849,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_UART > 0 arm_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/stm32wl5/stm32wl5_serial.c b/arch/arm/src/stm32wl5/stm32wl5_serial.c index d55b99c5af..604dd3993d 100644 --- a/arch/arm/src/stm32wl5/stm32wl5_serial.c +++ b/arch/arm/src/stm32wl5/stm32wl5_serial.c @@ -2928,7 +2928,7 @@ void stm32wl5_serial_dma_poll(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_UART > 0 struct stm32wl5_serial_s *priv = g_uart_devs[CONSOLE_UART - 1]; @@ -2938,7 +2938,6 @@ int up_putc(int ch) arm_lowputc(ch); stm32wl5serial_restoreusartint(priv, ie); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -2951,12 +2950,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #if CONSOLE_UART > 0 arm_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/str71x/str71x_serial.c b/arch/arm/src/str71x/str71x_serial.c index 6a72b0a613..53ddaddadd 100644 --- a/arch/arm/src/str71x/str71x_serial.c +++ b/arch/arm/src/str71x/str71x_serial.c @@ -950,7 +950,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_CONSOLE struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -963,7 +963,6 @@ int up_putc(int ch) up_waittxnotfull(priv); up_restoreuartint(priv, ier); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -976,12 +975,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_CONSOLE arm_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/tiva/common/tiva_serial.c b/arch/arm/src/tiva/common/tiva_serial.c index c223d38255..9b05adf72d 100644 --- a/arch/arm/src/tiva/common/tiva_serial.c +++ b/arch/arm/src/tiva/common/tiva_serial.c @@ -1572,7 +1572,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -1586,7 +1586,6 @@ int up_putc(int ch) up_waittxnotfull(priv); up_restoreuartint(priv, im); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -1599,12 +1598,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE arm_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/arm/src/tlsr82/tlsr82_serial.c b/arch/arm/src/tlsr82/tlsr82_serial.c index 78f3b6062e..b95551266a 100644 --- a/arch/arm/src/tlsr82/tlsr82_serial.c +++ b/arch/arm/src/tlsr82/tlsr82_serial.c @@ -1591,11 +1591,9 @@ static inline int tlsr82_uart_lowputc(int ch) ****************************************************************************/ #ifndef CONFIG_TLSR82_SPI_SYSLOG -int up_putc(int ch) +void up_putc(int ch) { tlsr82_uart_lowputc(ch); - - return 0; } #endif diff --git a/arch/arm/src/tlsr82/tlsr82_spi_console.c b/arch/arm/src/tlsr82/tlsr82_spi_console.c index 6b4e3e09bd..b82a3a705a 100644 --- a/arch/arm/src/tlsr82/tlsr82_spi_console.c +++ b/arch/arm/src/tlsr82/tlsr82_spi_console.c @@ -324,10 +324,8 @@ void spi_console_init(void) ****************************************************************************/ #ifdef CONFIG_TLSR82_SPI_SYSLOG -int up_putc(int ch) +void up_putc(int ch) { spi_putc((uint8_t)ch); - - return 0; } #endif diff --git a/arch/arm/src/tms570/tms570_lowputc.c b/arch/arm/src/tms570/tms570_lowputc.c index deb907b7e2..c5a5695101 100644 --- a/arch/arm/src/tms570/tms570_lowputc.c +++ b/arch/arm/src/tms570/tms570_lowputc.c @@ -226,12 +226,11 @@ void arm_lowputc(char ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE arm_lowputc(ch); #endif - return ch; } /**************************************************************************** diff --git a/arch/arm/src/xmc4/xmc4_serial.c b/arch/arm/src/xmc4/xmc4_serial.c index 08cb0f3a2a..133e780274 100644 --- a/arch/arm/src/xmc4/xmc4_serial.c +++ b/arch/arm/src/xmc4/xmc4_serial.c @@ -1120,7 +1120,7 @@ void arm_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART_CONSOLE struct xmc4_dev_s *priv = (struct xmc4_dev_s *)CONSOLE_DEV.priv; @@ -1130,8 +1130,6 @@ int up_putc(int ch) arm_lowputc(ch); xmc4_restoreuartint(priv, ccr); #endif - - return ch; } #else /* USE_SERIALDRIVER */ @@ -1144,11 +1142,10 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART_CONSOLE arm_lowputc(ch); - return ch; #endif } diff --git a/arch/arm64/src/a64/a64_serial.c b/arch/arm64/src/a64/a64_serial.c index 20e6bee63d..35c36d5853 100644 --- a/arch/arm64/src/a64/a64_serial.c +++ b/arch/arm64/src/a64/a64_serial.c @@ -1412,14 +1412,13 @@ void arm64_earlyserialinit(void) * ***************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef CONSOLE_DEV struct uart_dev_s *dev = &CONSOLE_DEV; a64_uart_wait_send(dev, ch); #endif - return ch; } /*************************************************************************** diff --git a/arch/arm64/src/imx8/imx8qm_serial.c b/arch/arm64/src/imx8/imx8qm_serial.c index 3d77b45801..c409b6829c 100644 --- a/arch/arm64/src/imx8/imx8qm_serial.c +++ b/arch/arm64/src/imx8/imx8qm_serial.c @@ -1049,12 +1049,11 @@ void arm64_earlyserialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { struct uart_dev_s *dev = &CONSOLE_DEV; imx8_send(dev, (uint8_t)ch); - return ch; } /**************************************************************************** diff --git a/arch/arm64/src/imx9/imx9_lpuart.c b/arch/arm64/src/imx9/imx9_lpuart.c index 337d65b497..a53bef673d 100644 --- a/arch/arm64/src/imx9/imx9_lpuart.c +++ b/arch/arm64/src/imx9/imx9_lpuart.c @@ -2790,7 +2790,7 @@ void arm64_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef CONSOLE_DEV struct imx9_uart_s *priv = (struct imx9_uart_s *)&CONSOLE_DEV; @@ -2798,7 +2798,7 @@ int up_putc(int ch) if (!CONSOLE_DEV.dev.isconsole) { - return ch; + return; } imx9_disableuartint(priv, &ie); @@ -2808,5 +2808,4 @@ int up_putc(int ch) #ifdef CONSOLE_DEV imx9_restoreuartint(priv, ie); #endif - return ch; } diff --git a/arch/arm64/src/rk3399/rk3399_serial.c b/arch/arm64/src/rk3399/rk3399_serial.c index dad69170a7..2acd0bbbd2 100644 --- a/arch/arm64/src/rk3399/rk3399_serial.c +++ b/arch/arm64/src/rk3399/rk3399_serial.c @@ -1355,14 +1355,13 @@ void arm64_earlyserialinit(void) * ***************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef CONSOLE_DEV struct uart_dev_s *dev = &CONSOLE_DEV; a64_uart_wait_send(dev, ch); #endif - return ch; } /*************************************************************************** diff --git a/arch/arm64/src/zynq-mpsoc/zynq_serial.c b/arch/arm64/src/zynq-mpsoc/zynq_serial.c index dacda08080..d5abc5c11a 100644 --- a/arch/arm64/src/zynq-mpsoc/zynq_serial.c +++ b/arch/arm64/src/zynq-mpsoc/zynq_serial.c @@ -1308,14 +1308,13 @@ void arm64_earlyserialinit(void) * ***************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef CONSOLE_DEV struct uart_dev_s *dev = &CONSOLE_DEV; zynq_uart_wait_send(dev, ch); #endif - return ch; } /*************************************************************************** diff --git a/arch/avr/src/at32uc3/at32uc3_serial.c b/arch/avr/src/at32uc3/at32uc3_serial.c index 8a04696437..113651e88b 100644 --- a/arch/avr/src/at32uc3/at32uc3_serial.c +++ b/arch/avr/src/at32uc3/at32uc3_serial.c @@ -754,7 +754,7 @@ void avr_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -764,7 +764,6 @@ int up_putc(int ch) avr_lowputc(ch); up_restoreusartint(priv, imr); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -777,12 +776,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE avr_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/avr/src/at90usb/at90usb_serial.c b/arch/avr/src/at90usb/at90usb_serial.c index 8bd44890c8..fd7e743120 100644 --- a/arch/avr/src/at90usb/at90usb_serial.c +++ b/arch/avr/src/at90usb/at90usb_serial.c @@ -561,7 +561,7 @@ void avr_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE uint8_t imr; @@ -570,7 +570,6 @@ int up_putc(int ch) avr_lowputc(ch); usart1_restoreusartint(imr); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -583,12 +582,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE avr_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/avr/src/atmega/atmega_serial.c b/arch/avr/src/atmega/atmega_serial.c index 0d72576050..71d01652d6 100644 --- a/arch/avr/src/atmega/atmega_serial.c +++ b/arch/avr/src/atmega/atmega_serial.c @@ -889,7 +889,7 @@ void avr_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE uint8_t imr; @@ -908,8 +908,6 @@ int up_putc(int ch) usart1_restoreusartint(imr); #endif #endif - - return ch; } #else /* USE_SERIALDRIVER */ @@ -922,12 +920,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE avr_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/hc/src/m9s12/m9s12_serial.c b/arch/hc/src/m9s12/m9s12_serial.c index 3e9fda857d..67e3cf0829 100644 --- a/arch/hc/src/m9s12/m9s12_serial.c +++ b/arch/hc/src/m9s12/m9s12_serial.c @@ -767,7 +767,7 @@ void hc_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_CONSOLE struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -780,7 +780,6 @@ int up_putc(int ch) up_waittxnotfull(priv); up_restoresciint(priv, im); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -793,12 +792,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef CONFIG_ARCH_LOWPUTC hc_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/mips/src/pic32mx/pic32mx_serial.c b/arch/mips/src/pic32mx/pic32mx_serial.c index 888be4dfc4..5ab802aafc 100644 --- a/arch/mips/src/pic32mx/pic32mx_serial.c +++ b/arch/mips/src/pic32mx/pic32mx_serial.c @@ -876,7 +876,7 @@ void mips_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE struct uart_dev_s *dev = (struct uart_dev_s *)&CONSOLE_DEV; @@ -886,7 +886,6 @@ int up_putc(int ch) mips_lowputc(ch); up_restoreuartint(dev, imr); #endif - return ch; } /**************************************************************************** @@ -908,9 +907,8 @@ void mips_serialinit(void) { } -int up_putc(int ch) +void up_putc(int ch) { - return ch; } #endif /* HAVE_UART_DEVICE */ @@ -924,12 +922,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE mips_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/mips/src/pic32mz/pic32mz_serial.c b/arch/mips/src/pic32mz/pic32mz_serial.c index 0cca1217a8..52ffc0473b 100644 --- a/arch/mips/src/pic32mz/pic32mz_serial.c +++ b/arch/mips/src/pic32mz/pic32mz_serial.c @@ -1413,7 +1413,7 @@ void mips_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE struct uart_dev_s *dev = (struct uart_dev_s *)&CONSOLE_DEV; @@ -1423,7 +1423,6 @@ int up_putc(int ch) mips_lowputc(ch); up_restoreuartint(dev, imr); #endif - return ch; } /**************************************************************************** @@ -1445,9 +1444,8 @@ void mips_serialinit(void) { } -int up_putc(int ch) +void up_putc(int ch) { - return ch; } #endif /* HAVE_UART_DEVICE */ @@ -1461,12 +1459,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE mips_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/misoc/src/common/misoc_serial.c b/arch/misoc/src/common/misoc_serial.c index ab0eae52d2..ad62240bfd 100644 --- a/arch/misoc/src/common/misoc_serial.c +++ b/arch/misoc/src/common/misoc_serial.c @@ -541,7 +541,7 @@ void misoc_earlyserialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE struct uart_dev_s *dev = (struct uart_dev_s *)&CONSOLE_DEV; @@ -551,7 +551,6 @@ int up_putc(int ch) misoc_lowputc(ch); misoc_restoreuartint(dev, imr); #endif - return ch; } /**************************************************************************** @@ -574,9 +573,8 @@ void misoc_serial_initialize(void) { } -int up_putc(int ch) +void up_putc(int ch) { - return ch; } #endif /* HAVE_UART_DEVICE */ @@ -590,13 +588,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE misoc_lowputc(ch); #endif - - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/or1k/src/mor1kx/mor1kx_serial.c b/arch/or1k/src/mor1kx/mor1kx_serial.c index dc0b0b3d81..04f443d38b 100644 --- a/arch/or1k/src/mor1kx/mor1kx_serial.c +++ b/arch/or1k/src/mor1kx/mor1kx_serial.c @@ -106,7 +106,7 @@ void or1k_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE irqstate_t flags; @@ -121,5 +121,4 @@ int up_putc(int ch) spin_unlock_irqrestore(NULL, flags); #endif - return ch; } diff --git a/arch/renesas/src/m16c/m16c_serial.c b/arch/renesas/src/m16c/m16c_serial.c index c374191813..1d9d779c2e 100644 --- a/arch/renesas/src/m16c/m16c_serial.c +++ b/arch/renesas/src/m16c/m16c_serial.c @@ -1094,7 +1094,7 @@ void renesas_consoleinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIALCONSOLE struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -1107,7 +1107,6 @@ int up_putc(int ch) up_waittxready(priv); up_restoreuartint(priv, ucon); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -1120,12 +1119,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIALCONSOLE renesas_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/renesas/src/rx65n/rx65n_serial.c b/arch/renesas/src/rx65n/rx65n_serial.c index 6cffba54a2..09195c9cb2 100644 --- a/arch/renesas/src/rx65n/rx65n_serial.c +++ b/arch/renesas/src/rx65n/rx65n_serial.c @@ -1692,7 +1692,7 @@ void renesas_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_CONSOLE struct up_dev_s *priv; @@ -1705,7 +1705,6 @@ int up_putc(int ch) up_waittxready(priv); up_restoresciint(priv, scr); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -1717,12 +1716,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_CONSOLE renesas_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/renesas/src/sh1/sh1_serial.c b/arch/renesas/src/sh1/sh1_serial.c index dcf2eada73..6d083989cd 100644 --- a/arch/renesas/src/sh1/sh1_serial.c +++ b/arch/renesas/src/sh1/sh1_serial.c @@ -880,7 +880,7 @@ void renesas_consoleinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_CONSOLE struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -893,7 +893,6 @@ int up_putc(int ch) up_waittxready(priv); up_restoresciint(priv, scr); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -906,12 +905,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_CONSOLE renesas_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/risc-v/src/bl602/bl602_serial.c b/arch/risc-v/src/bl602/bl602_serial.c index 66ffa78699..163f3a7c82 100644 --- a/arch/risc-v/src/bl602/bl602_serial.c +++ b/arch/risc-v/src/bl602/bl602_serial.c @@ -886,7 +886,7 @@ void riscv_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE irqstate_t flags = spin_lock_irqsave(NULL); @@ -894,7 +894,6 @@ int up_putc(int ch) riscv_lowputc(ch); spin_unlock_irqrestore(NULL, flags); #endif - return ch; } /**************************************************************************** @@ -917,9 +916,8 @@ void riscv_serialinit(void) { } -int up_putc(int ch) +void up_putc(int ch) { - return ch; } #endif /* HAVE_UART_DEVICE */ @@ -933,12 +931,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE riscv_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/risc-v/src/bl808/bl808_serial.c b/arch/risc-v/src/bl808/bl808_serial.c index 843d54651c..d0840d6cef 100644 --- a/arch/risc-v/src/bl808/bl808_serial.c +++ b/arch/risc-v/src/bl808/bl808_serial.c @@ -1004,7 +1004,7 @@ void bl808_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { struct bl808_uart_s *priv = CONSOLE_DEV.priv; uint8_t uart_idx = priv->config.idx; @@ -1016,5 +1016,4 @@ int up_putc(int ch) putreg32(ch, BL808_UART_FIFO_WDATA(uart_idx)); leave_critical_section(flags); - return ch; } diff --git a/arch/risc-v/src/c906/c906_serial.c b/arch/risc-v/src/c906/c906_serial.c index fe6e0c5ec1..af3c34f67d 100644 --- a/arch/risc-v/src/c906/c906_serial.c +++ b/arch/risc-v/src/c906/c906_serial.c @@ -663,7 +663,7 @@ void riscv_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -673,7 +673,6 @@ int up_putc(int ch) riscv_lowputc(ch); up_restoreuartint(priv, imr); #endif - return ch; } /**************************************************************************** @@ -696,9 +695,8 @@ void riscv_serialinit(void) { } -int up_putc(int ch) +void up_putc(int ch) { - return ch; } #endif /* HAVE_UART_DEVICE */ @@ -712,12 +710,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE riscv_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/risc-v/src/common/espressif/esp_serial.c b/arch/risc-v/src/common/espressif/esp_serial.c index 88161dad2f..3b62cbc7f2 100644 --- a/arch/risc-v/src/common/espressif/esp_serial.c +++ b/arch/risc-v/src/common/espressif/esp_serial.c @@ -1147,7 +1147,7 @@ void riscv_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef CONSOLE_UART uint32_t int_status; @@ -1160,7 +1160,6 @@ int up_putc(int ch) #ifdef CONSOLE_UART esp_lowputc_restore_all_uart_int(CONSOLE_DEV.priv, &int_status); #endif - return ch; } #else /* HAVE_UART_DEVICE */ @@ -1187,9 +1186,8 @@ void riscv_serialinit(void) { } -int up_putc(int ch) +void up_putc(int ch) { - return ch; } #endif /* HAVE_UART_DEVICE */ @@ -1211,13 +1209,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE riscv_lowputc(ch); #endif /* HAVE_SERIAL_CONSOLE */ - - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/risc-v/src/esp32c3-legacy/esp32c3_serial.c b/arch/risc-v/src/esp32c3-legacy/esp32c3_serial.c index 5c1ab90b06..2541e5f896 100644 --- a/arch/risc-v/src/esp32c3-legacy/esp32c3_serial.c +++ b/arch/risc-v/src/esp32c3-legacy/esp32c3_serial.c @@ -1102,7 +1102,7 @@ void riscv_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef CONSOLE_UART uint32_t int_status; @@ -1115,7 +1115,6 @@ int up_putc(int ch) #ifdef CONSOLE_UART esp32c3_lowputc_restore_all_uart_int(CONSOLE_DEV.priv, &int_status); #endif - return ch; } #endif /* HAVE_UART_DEVICE */ @@ -1130,7 +1129,7 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef CONSOLE_UART uint32_t int_status; @@ -1143,7 +1142,6 @@ int up_putc(int ch) #ifdef CONSOLE_UART esp32c3_lowputc_restore_all_uart_int(CONSOLE_DEV.priv, &int_status); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/risc-v/src/fe310/fe310_serial.c b/arch/risc-v/src/fe310/fe310_serial.c index b0d2a434c7..3d1dd8db66 100644 --- a/arch/risc-v/src/fe310/fe310_serial.c +++ b/arch/risc-v/src/fe310/fe310_serial.c @@ -653,7 +653,7 @@ void riscv_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -663,7 +663,6 @@ int up_putc(int ch) riscv_lowputc(ch); up_restoreuartint(priv, imr); #endif - return ch; } /**************************************************************************** @@ -686,9 +685,8 @@ void riscv_serialinit(void) { } -int up_putc(int ch) +void up_putc(int ch) { - return ch; } #endif /* HAVE_UART_DEVICE */ @@ -702,12 +700,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE riscv_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/risc-v/src/hpm6000/hpm_serial.c b/arch/risc-v/src/hpm6000/hpm_serial.c index ef4a46e06d..22b5732b1a 100644 --- a/arch/risc-v/src/hpm6000/hpm_serial.c +++ b/arch/risc-v/src/hpm6000/hpm_serial.c @@ -1292,7 +1292,7 @@ void riscv_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef CONSOLE_DEV struct hpm_uart_s *priv = (struct hpm_uart_s *)CONSOLE_DEV.dev.priv; @@ -1302,7 +1302,6 @@ int up_putc(int ch) hpm_lowputc(ch); hpm_restoreuartint(priv, im); #endif - return ch; } #else /* USE_SERIALDRIVER */ @@ -1315,12 +1314,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_UART_CONSOLE riscv_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/risc-v/src/hpm6750/hpm6750_serial.c b/arch/risc-v/src/hpm6750/hpm6750_serial.c index dd2de33c9a..1fb2bfa693 100644 --- a/arch/risc-v/src/hpm6750/hpm6750_serial.c +++ b/arch/risc-v/src/hpm6750/hpm6750_serial.c @@ -838,7 +838,7 @@ void riscv_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -848,7 +848,6 @@ int up_putc(int ch) riscv_lowputc(ch); up_restoreuartint(priv, imr); #endif - return ch; } /**************************************************************************** @@ -871,9 +870,8 @@ void riscv_serialinit(void) { } -int up_putc(int ch) +void up_putc(int ch) { - return ch; } #endif /* HAVE_UART_DEVICE */ @@ -887,12 +885,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE riscv_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/risc-v/src/k210/k210_serial.c b/arch/risc-v/src/k210/k210_serial.c index 7af73bd02f..5dbb5b6824 100644 --- a/arch/risc-v/src/k210/k210_serial.c +++ b/arch/risc-v/src/k210/k210_serial.c @@ -653,7 +653,7 @@ void riscv_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -663,7 +663,6 @@ int up_putc(int ch) riscv_lowputc(ch); up_restoreuartint(priv, imr); #endif - return ch; } /**************************************************************************** @@ -686,9 +685,8 @@ void riscv_serialinit(void) { } -int up_putc(int ch) +void up_putc(int ch) { - return ch; } #endif /* HAVE_UART_DEVICE */ @@ -702,12 +700,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE riscv_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/risc-v/src/k230/k230_start.c b/arch/risc-v/src/k230/k230_start.c index 37a8e2ee36..301384e012 100644 --- a/arch/risc-v/src/k230/k230_start.c +++ b/arch/risc-v/src/k230/k230_start.c @@ -191,10 +191,7 @@ void riscv_serialinit(void) } #ifdef CONFIG_RPMSG_UART_CONSOLE -int up_putc(int ch) +void up_putc(int ch) { - /* place holder for now */ - - return ch; } #endif diff --git a/arch/risc-v/src/litex/litex_serial.c b/arch/risc-v/src/litex/litex_serial.c index 6716756f4a..1c1b821f6b 100644 --- a/arch/risc-v/src/litex/litex_serial.c +++ b/arch/risc-v/src/litex/litex_serial.c @@ -685,7 +685,7 @@ void riscv_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -695,7 +695,6 @@ int up_putc(int ch) riscv_lowputc(ch); up_restoreuartint(priv, imr); #endif - return ch; } /**************************************************************************** @@ -718,9 +717,8 @@ void riscv_serialinit(void) { } -int up_putc(int ch) +void up_putc(int ch) { - return ch; } #endif /* HAVE_UART_DEVICE */ @@ -734,12 +732,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE riscv_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/risc-v/src/mpfs/mpfs_serial.c b/arch/risc-v/src/mpfs/mpfs_serial.c index 7f79d10bfc..309e1b4164 100644 --- a/arch/risc-v/src/mpfs/mpfs_serial.c +++ b/arch/risc-v/src/mpfs/mpfs_serial.c @@ -1245,7 +1245,7 @@ void riscv_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -1253,7 +1253,7 @@ int up_putc(int ch) if (!CONSOLE_DEV.isconsole) { - return ch; + return; } up_disableuartint(priv, &ier); @@ -1263,7 +1263,6 @@ int up_putc(int ch) #ifdef HAVE_SERIAL_CONSOLE up_restoreuartint(priv, ier); #endif - return ch; } /**************************************************************************** @@ -1286,9 +1285,8 @@ void riscv_serialinit(void) { } -int up_putc(int ch) +void up_putc(int ch) { - return ch; } #endif /* HAVE_UART_DEVICE */ @@ -1302,12 +1300,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE riscv_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/risc-v/src/rv32m1/rv32m1_serial.c b/arch/risc-v/src/rv32m1/rv32m1_serial.c index a6a5043a62..2425f7d1ca 100644 --- a/arch/risc-v/src/rv32m1/rv32m1_serial.c +++ b/arch/risc-v/src/rv32m1/rv32m1_serial.c @@ -1133,7 +1133,7 @@ void riscv_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef CONSOLE_DEV struct up_dev_s *priv = (struct up_dev_s *)CONSOLE_DEV.priv; @@ -1143,7 +1143,6 @@ int up_putc(int ch) riscv_lowputc(ch); up_restoreuartint(priv, im); #endif - return ch; } #ifdef HAVE_SERIAL_CONSOLE diff --git a/arch/sim/src/sim/sim_uart.c b/arch/sim/src/sim/sim_uart.c index 54bc95dc8e..248d814de9 100644 --- a/arch/sim/src/sim/sim_uart.c +++ b/arch/sim/src/sim/sim_uart.c @@ -786,11 +786,10 @@ void up_nputs(const char *str, size_t len) * Name: up_putc ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef USE_DEVCONSOLE char c = ch; up_nputs(&c, 1); #endif - return 0; } diff --git a/arch/sparc/src/bm3803/bm3803-serial.c b/arch/sparc/src/bm3803/bm3803-serial.c index 4aef048d57..e6fb7e1d38 100644 --- a/arch/sparc/src/bm3803/bm3803-serial.c +++ b/arch/sparc/src/bm3803/bm3803-serial.c @@ -870,7 +870,7 @@ void sparc_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE struct uart_dev_s *dev = (struct uart_dev_s *)&CONSOLE_DEV; @@ -880,7 +880,6 @@ int up_putc(int ch) sparc_lowputc(ch); up_restoreuartint(dev, imr); #endif - return ch; } /**************************************************************************** @@ -902,9 +901,8 @@ void sparc_serialinit(void) { } -int up_putc(int ch) +void up_putc(int ch) { - return ch; } #endif /* HAVE_UART_DEVICE */ @@ -918,12 +916,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE sparc_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/sparc/src/bm3823/bm3823-serial.c b/arch/sparc/src/bm3823/bm3823-serial.c index bd0f542bbb..4bfce9656d 100644 --- a/arch/sparc/src/bm3823/bm3823-serial.c +++ b/arch/sparc/src/bm3823/bm3823-serial.c @@ -865,7 +865,7 @@ void sparc_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE struct uart_dev_s *dev = (struct uart_dev_s *)&CONSOLE_DEV; @@ -875,7 +875,6 @@ int up_putc(int ch) sparc_lowputc(ch); up_restoreuartint(dev, imr); #endif - return ch; } /**************************************************************************** @@ -897,9 +896,8 @@ void sparc_serialinit(void) { } -int up_putc(int ch) +void up_putc(int ch) { - return ch; } #endif /* HAVE_UART_DEVICE */ @@ -913,12 +911,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE sparc_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/sparc/src/s698pm/s698pm-serial.c b/arch/sparc/src/s698pm/s698pm-serial.c index f68573c6fd..89675d4034 100644 --- a/arch/sparc/src/s698pm/s698pm-serial.c +++ b/arch/sparc/src/s698pm/s698pm-serial.c @@ -951,7 +951,7 @@ void sparc_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE struct uart_dev_s *dev = (struct uart_dev_s *)&CONSOLE_DEV; @@ -961,7 +961,6 @@ int up_putc(int ch) sparc_lowputc(ch); up_restoreuartint(dev, imr); #endif - return ch; } /**************************************************************************** @@ -983,9 +982,8 @@ void sparc_serialinit(void) { } -int up_putc(int ch) +void up_putc(int ch) { - return ch; } #endif /* HAVE_UART_DEVICE */ @@ -999,12 +997,11 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE sparc_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/tricore/src/tc3xx/tc3xx_serial.c b/arch/tricore/src/tc3xx/tc3xx_serial.c index 31bf3db75f..4edb62de90 100644 --- a/arch/tricore/src/tc3xx/tc3xx_serial.c +++ b/arch/tricore/src/tc3xx/tc3xx_serial.c @@ -722,11 +722,10 @@ void tricore_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE tricore_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/x86/src/qemu/qemu_serial.c b/arch/x86/src/qemu/qemu_serial.c index eb7d0eac4a..5fe1ec53f4 100644 --- a/arch/x86/src/qemu/qemu_serial.c +++ b/arch/x86/src/qemu/qemu_serial.c @@ -73,10 +73,9 @@ void uart_putreg(struct u16550_s *priv, * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { x86_lowputc(ch); - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/x86_64/src/intel64/intel64_serial.c b/arch/x86_64/src/intel64/intel64_serial.c index 58f0a254e2..780fe1a4e8 100644 --- a/arch/x86_64/src/intel64/intel64_serial.c +++ b/arch/x86_64/src/intel64/intel64_serial.c @@ -88,10 +88,9 @@ void up_lowputc(char ch) fb_putc(ch); } -int up_putc(int ch) +void up_putc(int ch) { up_lowputc(ch); - return ch; } #endif diff --git a/arch/xtensa/src/esp32/esp32_serial.c b/arch/xtensa/src/esp32/esp32_serial.c index 875b3679a1..981d310130 100644 --- a/arch/xtensa/src/esp32/esp32_serial.c +++ b/arch/xtensa/src/esp32/esp32_serial.c @@ -2114,7 +2114,7 @@ void xtensa_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE uint32_t intena; @@ -2126,7 +2126,5 @@ int up_putc(int ch) esp32_restoreuartint(CONSOLE_DEV.priv, intena); #endif - - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/xtensa/src/esp32s2/esp32s2_serial.c b/arch/xtensa/src/esp32s2/esp32s2_serial.c index 20ee55dee7..a026de48ac 100644 --- a/arch/xtensa/src/esp32s2/esp32s2_serial.c +++ b/arch/xtensa/src/esp32s2/esp32s2_serial.c @@ -1119,7 +1119,7 @@ void xtensa_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE uint32_t int_status; @@ -1128,7 +1128,6 @@ int up_putc(int ch) xtensa_lowputc(ch); esp32s2_lowputc_restore_all_uart_int(CONSOLE_DEV.priv, &int_status); #endif - return ch; } #else /* HAVE_UART_DEVICE */ @@ -1155,9 +1154,8 @@ void xtensa_serialinit(void) { } -int up_putc(int ch) +void up_putc(int ch) { - return ch; } #endif /* HAVE_UART_DEVICE */ @@ -1173,14 +1171,13 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef HAVE_SERIAL_CONSOLE uint32_t int_status; xtensa_lowputc(ch); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/xtensa/src/esp32s3/esp32s3_serial.c b/arch/xtensa/src/esp32s3/esp32s3_serial.c index 076f272a4e..880fcbf4e4 100644 --- a/arch/xtensa/src/esp32s3/esp32s3_serial.c +++ b/arch/xtensa/src/esp32s3/esp32s3_serial.c @@ -1210,7 +1210,7 @@ void xtensa_serialinit(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef CONSOLE_UART uint32_t int_status; @@ -1223,7 +1223,6 @@ int up_putc(int ch) #ifdef CONSOLE_UART esp32s3_lowputc_restore_all_uart_int(CONSOLE_DEV.priv, &int_status); #endif - return ch; } #endif /* HAVE_UART_DEVICE */ @@ -1238,7 +1237,7 @@ int up_putc(int ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef CONSOLE_UART uint32_t int_status; @@ -1251,7 +1250,6 @@ int up_putc(int ch) #ifdef CONSOLE_UART esp32s3_lowputc_restore_all_uart_int(CONSOLE_DEV.priv, &int_status); #endif - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/z16/src/z16f/z16f_serial.c b/arch/z16/src/z16f/z16f_serial.c index b590c90624..00009ea396 100644 --- a/arch/z16/src/z16f/z16f_serial.c +++ b/arch/z16/src/z16f/z16f_serial.c @@ -742,7 +742,7 @@ void z16_serialinit(void) ****************************************************************************/ #ifdef CONSOLE_DEV -int up_putc(int ch) +void up_putc(int ch) { uint8_t state; @@ -765,7 +765,6 @@ int up_putc(int ch) */ z16f_restoreuartirq(&CONSOLE_DEV, state); - return ch; } #endif @@ -810,12 +809,11 @@ static void z16f_putc(int ch) * Name: up_putc ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { /* Output character */ z16f_putc(ch); - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/z80/src/ez80/ez80_serial.c b/arch/z80/src/ez80/ez80_serial.c index 19e7dbdf71..4913717e92 100644 --- a/arch/z80/src/ez80/ez80_serial.c +++ b/arch/z80/src/ez80/ez80_serial.c @@ -733,7 +733,7 @@ void z80_serial_initialize(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef CONSOLE_DEV FAR struct ez80_dev_s *priv = (FAR struct ez80_dev_s *)CONSOLE_DEV.priv; @@ -750,7 +750,6 @@ int up_putc(int ch) ez80_waittxready(priv); ez80_restoreuartint(priv, ier); - return ch; #endif } @@ -794,12 +793,11 @@ static void ez80_putc(int ch) * Name: up_putc ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { /* Output character */ ez80_putc(ch); - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/arch/z80/src/z180/z180_lowserial.c b/arch/z80/src/z180/z180_lowserial.c index d5464a66c8..77658ed5bb 100644 --- a/arch/z80/src/z180/z180_lowserial.c +++ b/arch/z80/src/z180/z180_lowserial.c @@ -58,13 +58,12 @@ #ifdef USE_SERIALDRIVER int z80_lowputc(int ch) #else -int up_putc(int ch) +void up_putc(int ch) #endif { /* Output the character */ z180_putc(ch); - return ch; } #endif /* HAVE_SERIAL */ diff --git a/arch/z80/src/z180/z180_scc.c b/arch/z80/src/z180/z180_scc.c index 5034f3c9d5..daebc3b005 100644 --- a/arch/z80/src/z180/z180_scc.c +++ b/arch/z80/src/z180/z180_scc.c @@ -595,7 +595,7 @@ void z80_serial_initialize(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { #ifdef CONSOLE_DEV /* Disable [E]SCC interrupts and perform the low-level output */ @@ -603,7 +603,6 @@ int up_putc(int ch) z180_disableuartint(priv); z80_lowputc(ch); z180_restoreuartint(priv); - return ch; #endif } #endif /* USE_SERIALDRIVER */ diff --git a/arch/z80/src/z180/z180_serial.h b/arch/z80/src/z180/z180_serial.h index 1999d0e72b..25b406567e 100644 --- a/arch/z80/src/z180/z180_serial.h +++ b/arch/z80/src/z180/z180_serial.h @@ -59,7 +59,7 @@ void z180_putc(uint8_t ch) __naked; #ifdef USE_SERIALDRIVER int z80_lowputc(int ch); #else -int up_putc(int ch); +void up_putc(int ch); # define z80_lowputc(ch) up_putc(ch) #endif diff --git a/arch/z80/src/z8/z8_serial.c b/arch/z80/src/z8/z8_serial.c index e53d10df7a..d0a432e81c 100644 --- a/arch/z80/src/z8/z8_serial.c +++ b/arch/z80/src/z8/z8_serial.c @@ -724,7 +724,7 @@ void z80_serial_initialize(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { uint8_t state; @@ -744,7 +744,6 @@ int up_putc(int ch) */ z8_restoreuartirq(&CONSOLE_DEV, state); - return ch; } #else /* USE_SERIALDRIVER */ @@ -796,12 +795,11 @@ static void z8_putc(int ch) * Name: up_putc ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { /* Output character */ z8_putc(ch); - return ch; } #endif /* USE_SERIALDRIVER */ diff --git a/boards/renesas/m16c/skp16c26/src/m16c_lcdconsole.c b/boards/renesas/m16c/skp16c26/src/m16c_lcdconsole.c index cf13b00ba5..907e097ed3 100644 --- a/boards/renesas/m16c/skp16c26/src/m16c_lcdconsole.c +++ b/boards/renesas/m16c/skp16c26/src/m16c_lcdconsole.c @@ -116,10 +116,9 @@ void renesas_lowputc(char ch) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { up_lcdputc(ch); - return ch; } #endif /* !HAVE_SERIALCONSOLE && CONFIG_SLCD && CONFIG_SLCD_CONSOLE */ diff --git a/boards/z80/z80/z80sim/src/z80_serial.c b/boards/z80/z80/z80sim/src/z80_serial.c index f04ff5513c..05fb56ec1a 100644 --- a/boards/z80/z80/z80sim/src/z80_serial.c +++ b/boards/z80/z80/z80sim/src/z80_serial.c @@ -318,7 +318,7 @@ void z80_serial_initialize(void) * ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { z80_lowputc(ch); return 0; diff --git a/drivers/serial/serial_cmsdk.c b/drivers/serial/serial_cmsdk.c index 7fdbfe72ee..e488a598d3 100644 --- a/drivers/serial/serial_cmsdk.c +++ b/drivers/serial/serial_cmsdk.c @@ -772,7 +772,7 @@ void cmsdk_serialinit(void) ****************************************************************************/ #ifdef HAVE_CMSDK_CONSOLE -int up_putc(int ch) +void up_putc(int ch) { FAR struct uart_cmsdk_s *priv = CONSOLE_DEV.priv; uint32_t ier; @@ -780,6 +780,5 @@ int up_putc(int ch) ier = uart_cmsdk_disableuartint(priv); uart_cmsdk_putc(priv, ch); uart_cmsdk_restoreuartint(priv, ier); - return ch; } #endif diff --git a/drivers/serial/uart_16550.c b/drivers/serial/uart_16550.c index fba8c8e453..1547551815 100644 --- a/drivers/serial/uart_16550.c +++ b/drivers/serial/uart_16550.c @@ -1700,13 +1700,11 @@ void u16550_serialinit(void) ****************************************************************************/ #ifdef HAVE_16550_CONSOLE -int up_putc(int ch) +void up_putc(int ch) { FAR struct u16550_s *priv = (FAR struct u16550_s *)CONSOLE_DEV.priv; u16550_putc(priv, ch); - - return ch; } #endif diff --git a/drivers/serial/uart_hostfs.c b/drivers/serial/uart_hostfs.c index 32a459c9c9..0edb0e9ba5 100644 --- a/drivers/serial/uart_hostfs.c +++ b/drivers/serial/uart_hostfs.c @@ -293,10 +293,9 @@ void uart_hostfs_init(void) uart_register("/dev/console", &g_uart_hostfs_dev); } -int up_putc(int ch) +void up_putc(int ch) { FAR struct uart_dev_s *dev = &g_uart_hostfs_dev; uart_hostfs_send(dev, ch); - return ch; } diff --git a/drivers/serial/uart_pci_16550.c b/drivers/serial/uart_pci_16550.c index efe1d57061..7afc80e0ec 100644 --- a/drivers/serial/uart_pci_16550.c +++ b/drivers/serial/uart_pci_16550.c @@ -760,7 +760,7 @@ static int pci_u16550_probe(FAR struct pci_device_s *dev) *****************************************************************************/ #ifdef CONFIG_16550_PCI_CONSOLE -int up_putc(int ch) +void up_putc(int ch) { irqstate_t flags; @@ -768,7 +768,7 @@ int up_putc(int ch) if (CONSOLE_DEV.ops == NULL) { - return ch; + return; } /* All interrupts must be disabled to prevent re-entrancy and to prevent @@ -778,8 +778,6 @@ int up_putc(int ch) flags = spin_lock_irqsave(NULL); u16550_putc(CONSOLE_DEV.priv, ch); spin_unlock_irqrestore(NULL, flags); - - return ch; } #endif diff --git a/drivers/serial/uart_pl011.c b/drivers/serial/uart_pl011.c index c3fd3e0abd..4cd4f44640 100644 --- a/drivers/serial/uart_pl011.c +++ b/drivers/serial/uart_pl011.c @@ -1061,13 +1061,11 @@ void pl011_serialinit(void) ***************************************************************************/ #ifdef HAVE_PL011_CONSOLE -int up_putc(int ch) +void up_putc(int ch) { FAR struct uart_dev_s *dev = &CONSOLE_DEV; pl011_putc(dev, ch); - - return ch; } #endif diff --git a/drivers/syslog/syslog_channel.c b/drivers/syslog/syslog_channel.c index 8b7db478ef..95c0dea2db 100644 --- a/drivers/syslog/syslog_channel.c +++ b/drivers/syslog/syslog_channel.c @@ -235,10 +235,9 @@ static int syslog_default_putc(FAR syslog_channel_t *channel, int ch) UNUSED(channel); # ifdef CONFIG_ARCH_LOWPUTC - return up_putc(ch); -# else - return ch; + up_putc(ch); # endif + return ch; } static ssize_t syslog_default_write(FAR syslog_channel_t *channel, diff --git a/drivers/virtio/virtio-serial.c b/drivers/virtio/virtio-serial.c index 186c884f07..7a7a913f77 100644 --- a/drivers/virtio/virtio-serial.c +++ b/drivers/virtio/virtio-serial.c @@ -668,13 +668,11 @@ int virtio_register_serial_driver(void) * Name: up_putc ****************************************************************************/ -int up_putc(int ch) +void up_putc(int ch) { if (g_virtio_console != NULL) { virtio_serial_send(g_virtio_console, ch); } - - return ch; } #endif diff --git a/include/nuttx/arch.h b/include/nuttx/arch.h index 88d3022ce2..33b359441e 100644 --- a/include/nuttx/arch.h +++ b/include/nuttx/arch.h @@ -2824,7 +2824,7 @@ int arch_phy_irq(FAR const char *intf, xcpt_t handler, void *arg, * ****************************************************************************/ -int up_putc(int ch); +void up_putc(int ch); /**************************************************************************** * Name: up_puts diff --git a/libs/libc/stream/lib_lowoutstream.c b/libs/libc/stream/lib_lowoutstream.c index ffefea7cac..4a778c75b4 100644 --- a/libs/libc/stream/lib_lowoutstream.c +++ b/libs/libc/stream/lib_lowoutstream.c @@ -67,7 +67,9 @@ static void lowoutstream_putc(FAR struct lib_outstream_s *self, int ch) { DEBUGASSERT(self); - if (up_putc(ch) != EOF) + up_putc(ch); + + if (ch != EOF) { self->nput++; }