Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/luna68k/dev Minor KNF. No binary changes.
details: https://anonhg.NetBSD.org/src/rev/6160e7974e0d
branches: trunk
changeset: 330707:6160e7974e0d
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Fri Jul 18 18:02:08 2014 +0000
description:
Minor KNF. No binary changes.
diffstat:
sys/arch/luna68k/dev/lunaws.c | 14 +++++++-------
sys/arch/luna68k/dev/siotty.c | 40 ++++++++++++++++++++--------------------
2 files changed, 27 insertions(+), 27 deletions(-)
diffs (178 lines):
diff -r 6a62537d6060 -r 6160e7974e0d sys/arch/luna68k/dev/lunaws.c
--- a/sys/arch/luna68k/dev/lunaws.c Fri Jul 18 17:59:12 2014 +0000
+++ b/sys/arch/luna68k/dev/lunaws.c Fri Jul 18 18:02:08 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lunaws.c,v 1.28 2014/02/02 15:35:06 tsutsui Exp $ */
+/* $NetBSD: lunaws.c,v 1.29 2014/07/18 18:02:08 tsutsui Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: lunaws.c,v 1.28 2014/02/02 15:35:06 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lunaws.c,v 1.29 2014/07/18 18:02:08 tsutsui Exp $");
#include "wsmouse.h"
@@ -199,7 +199,7 @@
int rr;
rr = getsiocsr(sio);
- if (rr & RR_RXRDY) {
+ if ((rr & RR_RXRDY) != 0) {
do {
code = sio->sio_data;
if (rr & (RR_FRAMING | RR_OVERRUN | RR_PARITY)) {
@@ -208,10 +208,10 @@
}
sc->sc_rxq[sc->sc_rxqtail] = code;
sc->sc_rxqtail = OMKBD_NEXTRXQ(sc->sc_rxqtail);
- } while ((rr = getsiocsr(sio)) & RR_RXRDY);
+ } while (((rr = getsiocsr(sio)) & RR_RXRDY) != 0);
softint_schedule(sc->sc_si);
}
- if (rr & RR_TXRDY)
+ if ((rr & RR_TXRDY) != 0)
sio->sio_cmd = WR0_RSTPEND;
/* not capable of transmit, yet */
}
@@ -241,9 +241,9 @@
code = (code & 07) ^ 07;
/* LMR->RML: wsevent counts 0 for leftmost */
sc->sc_msbuttons = (code & 02);
- if (code & 01)
+ if ((code & 01) != 0)
sc->sc_msbuttons |= 04;
- if (code & 04)
+ if ((code & 04) != 0)
sc->sc_msbuttons |= 01;
sc->sc_msreport = 1;
} else if (sc->sc_msreport == 1) {
diff -r 6a62537d6060 -r 6160e7974e0d sys/arch/luna68k/dev/siotty.c
--- a/sys/arch/luna68k/dev/siotty.c Fri Jul 18 17:59:12 2014 +0000
+++ b/sys/arch/luna68k/dev/siotty.c Fri Jul 18 18:02:08 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: siotty.c,v 1.40 2014/03/16 05:20:24 dholland Exp $ */
+/* $NetBSD: siotty.c,v 1.41 2014/07/18 18:02:08 tsutsui Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: siotty.c,v 1.40 2014/03/16 05:20:24 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: siotty.c,v 1.41 2014/07/18 18:02:08 tsutsui Exp $");
#include "opt_ddb.h"
@@ -231,7 +231,7 @@
sio->sio_cmd = WR0_RSTINT;
cn_check_magic(sc->sc_tty->t_dev, CNC_BREAK, siotty_cnm_state);
}
- if (rr & RR_RXRDY) {
+ if ((rr & RR_RXRDY) != 0) {
do {
if (cc > 0) {
c = sio->sio_data;
@@ -250,9 +250,9 @@
sc->sc_rbput = put;
sc->sc_rbavail = cc;
sc->sc_rx_ready = true;
- } while ((rr = getsiocsr(sio)) & RR_RXRDY);
+ } while (((rr = getsiocsr(sio)) & RR_RXRDY) != 0);
}
- if (rr & RR_TXRDY) {
+ if ((rr & RR_TXRDY) != 0) {
sio->sio_cmd = WR0_RSTPEND;
if (sc->sc_tbc > 0) {
sio->sio_data = *sc->sc_tba;
@@ -349,7 +349,7 @@
sc = device_lookup_private(&siotty_cd, minor(tp->t_dev));
s = splserial();
- if (tp->t_state & (TS_BUSY|TS_TIMEOUT|TS_TTSTOP))
+ if ((tp->t_state & (TS_BUSY|TS_TIMEOUT|TS_TTSTOP)) != 0)
goto out;
if (!ttypull(tp))
goto out;
@@ -397,11 +397,11 @@
if (wr4 < 0)
return EINVAL;
- if (sc->sc_flags & TIOCFLAG_SOFTCAR) {
+ if ((sc->sc_flags & TIOCFLAG_SOFTCAR) != 0) {
t->c_cflag |= CLOCAL;
t->c_cflag &= ~HUPCL;
}
- if (sc->sc_flags & TIOCFLAG_CLOCAL)
+ if ((sc->sc_flags & TIOCFLAG_CLOCAL) != 0)
t->c_cflag |= CLOCAL;
/*
@@ -426,7 +426,7 @@
sc->sc_wr[WR3] |= WR3_RX8BIT; sc->sc_wr[WR5] |= WR5_TX8BIT;
break;
}
- if (tp->t_cflag & PARENB) {
+ if ((tp->t_cflag & PARENB) != 0) {
wr4 |= WR4_PARENAB;
if ((tp->t_cflag & PARODD) == 0)
wr4 |= WR4_EPARITY;
@@ -451,11 +451,11 @@
uint16_t rr;
val = 0;
- if (control & TIOCM_BREAK)
+ if ((control & TIOCM_BREAK) != 0)
val |= WR5_BREAK;
- if (control & TIOCM_DTR)
+ if ((control & TIOCM_DTR) != 0)
val |= WR5_DTR;
- if (control & TIOCM_RTS)
+ if ((control & TIOCM_RTS) != 0)
val |= WR5_RTS;
s = splserial();
wr5 = sc->sc_wr[WR5];
@@ -472,13 +472,13 @@
case DMGET:
val = 0;
rr = getsiocsr(sc->sc_ctl);
- if (wr5 & WR5_DTR)
+ if ((wr5 & WR5_DTR) != 0)
val |= TIOCM_DTR;
- if (wr5 & WR5_RTS)
+ if ((wr5 & WR5_RTS) != 0)
val |= TIOCM_RTS;
- if (rr & RR_CTS)
+ if ((rr & RR_CTS) != 0)
val |= TIOCM_CTS;
- if (rr & RR_DCD)
+ if ((rr & RR_DCD) != 0)
val |= TIOCM_CD;
goto done;
}
@@ -525,9 +525,9 @@
/* raise RTS and DTR here; but, DTR lead is not wired */
/* then check DCD condition; but, DCD lead is not wired */
#if 0
- if ((sc->sc_flags & TIOCFLAG_SOFTCAR)
- || (tp->t_cflag & MDMBUF)
- || (getsiocsr(sc->sc_ctl) & RR_DCD))
+ if ((sc->sc_flags & TIOCFLAG_SOFTCAR) != 0
+ || (tp->t_cflag & MDMBUF) != 0
+ || (getsiocsr(sc->sc_ctl) & RR_DCD) != 0)
tp->t_state |= TS_CARR_ON;
else
tp->t_state &= ~TS_CARR_ON;
@@ -559,7 +559,7 @@
s = splserial();
siomctl(sc, TIOCM_BREAK, DMBIC);
#if 0 /* because unable to feed DTR signal */
- if ((tp->t_cflag & HUPCL)
+ if ((tp->t_cflag & HUPCL) != 0
|| tp->t_wopen || (tp->t_state & TS_ISOPEN) == 0) {
siomctl(sc, TIOCM_DTR, DMBIC);
/* Yield CPU time to others for 1 second, then ... */
Home |
Main Index |
Thread Index |
Old Index