Module Name:    src
Committed By:   skrll
Date:           Fri May 20 06:56:59 UTC 2022

Modified Files:
        src/sys/arch/arm/imx: imxuart.c

Log Message:
Use a macro.  Part of

port-arm/45354: no character is put in the read-ahead buffer in a console code 
of arch/arm/imx/imxuart.c


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/arm/imx/imxuart.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/imx/imxuart.c
diff -u src/sys/arch/arm/imx/imxuart.c:1.27 src/sys/arch/arm/imx/imxuart.c:1.28
--- src/sys/arch/arm/imx/imxuart.c:1.27	Mon Mar  8 06:23:31 2021
+++ src/sys/arch/arm/imx/imxuart.c	Fri May 20 06:56:59 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: imxuart.c,v 1.27 2021/03/08 06:23:31 mlelstv Exp $ */
+/* $NetBSD: imxuart.c,v 1.28 2022/05/20 06:56:59 skrll Exp $ */
 
 /*
  * Copyright (c) 2009, 2010  Genetec Corporation.  All rights reserved.
@@ -96,7 +96,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: imxuart.c,v 1.27 2021/03/08 06:23:31 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imxuart.c,v 1.28 2022/05/20 06:56:59 skrll Exp $");
 
 #include "opt_imxuart.h"
 #include "opt_ddb.h"
@@ -2111,8 +2111,7 @@ imxuart_common_getc(dev_t dev, struct im
 	uint32_t usr2;
 
 	/* got a character from reading things earlier */
-	if (imxuart_readahead_in != imxuart_readahead_out) {
-
+	if (!READAHEAD_IS_EMPTY()) {
 		c = imxuart_readahead[imxuart_readahead_out];
 		imxuart_readahead_out = (imxuart_readahead_out + 1) &
 		    (READAHEAD_RING_LEN-1);

Reply via email to