From 185de258bf4f6d6e094a710b8b84f52d57b21287 Mon Sep 17 00:00:00 2001 From: Norman Rasmussen Date: Fri, 31 Dec 2021 01:30:31 -0800 Subject: [PATCH] Fix preprocessing directives for uart flow control commit 58bd8737297efcf5c6f4f8961c88e86a3d5113c7 had a mix of `#if defined(X)` and `#ifdef X`, but used `#if X` in its TCSETS ioctl logic which causes compile warnings. --- arch/risc-v/src/bl602/bl602_serial.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/risc-v/src/bl602/bl602_serial.c b/arch/risc-v/src/bl602/bl602_serial.c index 5d5db2b090f..4ff554635ec 100644 --- a/arch/risc-v/src/bl602/bl602_serial.c +++ b/arch/risc-v/src/bl602/bl602_serial.c @@ -567,19 +567,19 @@ static int bl602_ioctl(struct file *filep, int cmd, unsigned long arg) if (priv->config.idx == 0) { -#if CONFIG_UART0_IFLOWCONTROL +#ifdef CONFIG_UART0_IFLOWCONTROL config.iflow_ctl = (termiosp->c_cflag & CRTS_IFLOW) != 0; #endif -#if CONFIG_UART0_OFLOWCONTROL +#ifdef CONFIG_UART0_OFLOWCONTROL config.oflow_ctl = (termiosp->c_cflag & CCTS_OFLOW) != 0; #endif } else { -#if CONFIG_UART1_IFLOWCONTROL +#ifdef CONFIG_UART1_IFLOWCONTROL config.iflow_ctl = (termiosp->c_cflag & CRTS_IFLOW) != 0; #endif -#if CONFIG_UART1_OFLOWCONTROL +#ifdef CONFIG_UART1_OFLOWCONTROL config.oflow_ctl = (termiosp->c_cflag & CCTS_OFLOW) != 0; #endif }