diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/scsi/cd.c | 18 | ||||
-rw-r--r-- | sys/scsi/ch.c | 6 | ||||
-rw-r--r-- | sys/scsi/safte.c | 4 | ||||
-rw-r--r-- | sys/scsi/scsi_base.c | 8 | ||||
-rw-r--r-- | sys/scsi/scsi_ioctl.c | 4 | ||||
-rw-r--r-- | sys/scsi/uk.c | 4 |
6 files changed, 22 insertions, 22 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index 4fc573c8afc..a6ed5f0af1a 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.c,v 1.232 2019/11/21 23:22:14 krw Exp $ */ +/* $OpenBSD: cd.c,v 1.233 2019/11/22 15:34:29 krw Exp $ */ /* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */ /* @@ -355,7 +355,7 @@ cdopen(dev_t dev, int flag, int fmt, struct proc *p) link->flags |= SDEV_MEDIA_LOADED; if (cd_get_parms(sc, (rawopen ? SCSI_SILENT : 0) | SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_MEDIA_CHANGE)) { - link->flags &= ~SDEV_MEDIA_LOADED; + CLR(link->flags, SDEV_MEDIA_LOADED); error = ENXIO; goto bad; } @@ -379,7 +379,7 @@ bad: scsi_prevent(link, PR_ALLOW, SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_MEDIA_CHANGE | SCSI_SILENT); - link->flags &= ~(SDEV_OPEN | SDEV_MEDIA_LOADED); + CLR(link->flags, SDEV_OPEN | SDEV_MEDIA_LOADED); } disk_unlock(&sc->sc_dk); @@ -415,12 +415,12 @@ cdclose(dev_t dev, int flag, int fmt, struct proc *p) scsi_prevent(sc->sc_link, PR_ALLOW, SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_NOT_READY | SCSI_SILENT); - sc->sc_link->flags &= ~(SDEV_OPEN | SDEV_MEDIA_LOADED); + CLR(sc->sc_link->flags, SDEV_OPEN | SDEV_MEDIA_LOADED); if (sc->sc_link->flags & SDEV_EJECTING) { scsi_start(sc->sc_link, SSS_STOP|SSS_LOEJ, 0); - sc->sc_link->flags &= ~SDEV_EJECTING; + CLR(sc->sc_link->flags, SDEV_EJECTING); } timeout_del(&sc->sc_timeout); @@ -1064,7 +1064,7 @@ close_tray: sc->sc_link->flags |= (SDEV_DB1 | SDEV_DB2); break; case CDIOCCLRDEBUG: - sc->sc_link->flags &= ~(SDEV_DB1 | SDEV_DB2); + CLR(sc->sc_link->flags, SDEV_DB1 | SDEV_DB2); break; case CDIOCRESET: case SCIOCRESET: @@ -1319,7 +1319,7 @@ cd_set_pa_immed(struct cd_softc *sc, int flags) if (error == 0) { oflags = audio->flags; - audio->flags &= ~CD_PA_SOTC; + CLR(audio->flags, CD_PA_SOTC); audio->flags |= CD_PA_IMMED; if (audio->flags != oflags) { if (big) @@ -2234,11 +2234,11 @@ cd_eject(void) scsi_prevent(sc->sc_link, PR_ALLOW, SCSI_IGNORE_ILLEGAL_REQUEST | SCSI_IGNORE_NOT_READY | SCSI_SILENT | SCSI_IGNORE_MEDIA_CHANGE); - sc->sc_link->flags &= ~SDEV_MEDIA_LOADED; + CLR(sc->sc_link->flags, SDEV_MEDIA_LOADED); scsi_start(sc->sc_link, SSS_STOP|SSS_LOEJ, 0); - sc->sc_link->flags &= ~SDEV_EJECTING; + CLR(sc->sc_link->flags, SDEV_EJECTING); } disk_unlock(&sc->sc_dk); diff --git a/sys/scsi/ch.c b/sys/scsi/ch.c index e76d71f1ace..8b0ce29c61c 100644 --- a/sys/scsi/ch.c +++ b/sys/scsi/ch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ch.c,v 1.55 2019/11/21 23:22:14 krw Exp $ */ +/* $OpenBSD: ch.c,v 1.56 2019/11/22 15:34:29 krw Exp $ */ /* $NetBSD: ch.c,v 1.26 1997/02/21 22:06:52 thorpej Exp $ */ /* @@ -241,7 +241,7 @@ chopen(dev_t dev, int flags, int fmt, struct proc *p) return (0); bad: - sc->sc_link->flags &= ~SDEV_OPEN; + CLR(sc->sc_link->flags, SDEV_OPEN); return (error); } @@ -250,7 +250,7 @@ chclose(dev_t dev, int flags, int fmt, struct proc *p) { struct ch_softc *sc = ch_cd.cd_devs[CHUNIT(dev)]; - sc->sc_link->flags &= ~SDEV_OPEN; + CLR(sc->sc_link->flags, SDEV_OPEN); return (0); } diff --git a/sys/scsi/safte.c b/sys/scsi/safte.c index 54cd18df2ef..2a77be9fde3 100644 --- a/sys/scsi/safte.c +++ b/sys/scsi/safte.c @@ -1,4 +1,4 @@ -/* $OpenBSD: safte.c,v 1.58 2019/09/27 17:22:31 krw Exp $ */ +/* $OpenBSD: safte.c,v 1.59 2019/11/22 15:34:29 krw Exp $ */ /* * Copyright (c) 2005 David Gwynne <dlg@openbsd.org> @@ -449,7 +449,7 @@ safte_read_encstat(void *arg) for (i = 0; i < sc->sc_nsensors; i++) { s = &sc->sc_sensors[i]; - s->se_sensor.flags &= ~SENSOR_FUNKNOWN; + CLR(s->se_sensor.flags, SENSOR_FUNKNOWN); DPRINTF(("%s: %d type: %d field: 0x%02x\n", DEVNAME(sc), i, s->se_type, *s->se_field)); diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index fcce9f680e7..437dedf3745 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_base.c,v 1.240 2019/11/21 23:22:14 krw Exp $ */ +/* $OpenBSD: scsi_base.c,v 1.241 2019/11/22 15:34:29 krw Exp $ */ /* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */ /* @@ -1519,7 +1519,7 @@ scsi_interpret_sense(struct scsi_xfer *xs) case SENSE_NOMEDIUM_TOPEN: case SENSE_NOMEDIUM_LOADABLE: case SENSE_NOMEDIUM_AUXMEM: - link->flags &= ~SDEV_MEDIA_LOADED; + CLR(link->flags, SDEV_MEDIA_LOADED); error = ENOMEDIUM; break; default: @@ -1534,7 +1534,7 @@ scsi_interpret_sense(struct scsi_xfer *xs) case SENSE_NOMEDIUM_TOPEN: case SENSE_NOMEDIUM_LOADABLE: case SENSE_NOMEDIUM_AUXMEM: - link->flags &= ~SDEV_MEDIA_LOADED; + CLR(link->flags, SDEV_MEDIA_LOADED); error = ENOMEDIUM; break; case SENSE_BAD_MEDIUM: @@ -1573,7 +1573,7 @@ scsi_interpret_sense(struct scsi_xfer *xs) break; } if ((link->flags & SDEV_REMOVABLE) != 0) - link->flags &= ~SDEV_MEDIA_LOADED; + CLR(link->flags, SDEV_MEDIA_LOADED); if (ISSET(xs->flags, SCSI_IGNORE_MEDIA_CHANGE) || /* XXX Should reupload any transient state. */ (link->flags & SDEV_REMOVABLE) == 0) { diff --git a/sys/scsi/scsi_ioctl.c b/sys/scsi/scsi_ioctl.c index b3732055395..64951e2fb7e 100644 --- a/sys/scsi/scsi_ioctl.c +++ b/sys/scsi/scsi_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_ioctl.c,v 1.58 2019/11/21 22:31:27 krw Exp $ */ +/* $OpenBSD: scsi_ioctl.c,v 1.59 2019/11/22 15:34:29 krw Exp $ */ /* $NetBSD: scsi_ioctl.c,v 1.23 1996/10/12 23:23:17 christos Exp $ */ /* @@ -336,7 +336,7 @@ scsi_do_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag) int level = *((int *)addr); SC_DEBUG(link, SDEV_DB3, ("debug set to %d\n", level)); - link->flags &= ~SDEV_DBX; /* clear debug bits */ + CLR(link->flags, SDEV_DBX); /* clear debug bits */ if (level & 1) link->flags |= SDEV_DB1; if (level & 2) diff --git a/sys/scsi/uk.c b/sys/scsi/uk.c index e8a78b135bd..2dd209dca5e 100644 --- a/sys/scsi/uk.c +++ b/sys/scsi/uk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uk.c,v 1.19 2017/09/08 05:36:53 deraadt Exp $ */ +/* $OpenBSD: uk.c,v 1.20 2019/11/22 15:34:29 krw Exp $ */ /* $NetBSD: uk.c,v 1.15 1996/03/17 00:59:57 thorpej Exp $ */ /* @@ -159,7 +159,7 @@ ukclose(dev_t dev, int flag, int fmt, struct proc *p) return (ENXIO); SC_DEBUG(sc->sc_link, SDEV_DB1, ("closing\n")); - sc->sc_link->flags &= ~SDEV_OPEN; + CLR(sc->sc_link->flags, SDEV_OPEN); device_unref(&sc->sc_dev); return (0); |