Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/imx Use a macro. Part of



details:   https://anonhg.NetBSD.org/src/rev/aac83c45a00a
branches:  trunk
changeset: 366247:aac83c45a00a
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri May 20 06:56:59 2022 +0000

description:
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

diffstat:

 sys/arch/arm/imx/imxuart.c |  7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r fd0c37941dfa -r aac83c45a00a sys/arch/arm/imx/imxuart.c
--- a/sys/arch/arm/imx/imxuart.c        Thu May 19 23:12:40 2022 +0000
+++ b/sys/arch/arm/imx/imxuart.c        Fri May 20 06:56:59 2022 +0000
@@ -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 @@
        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);



Home | Main Index | Thread Index | Old Index