diff options
author | 2019-11-21 22:31:26 +0000 | |
---|---|---|
committer | 2019-11-21 22:31:26 +0000 | |
commit | 36e286aaa1a51639300ad3f7dd37249428efe9f0 (patch) | |
tree | 468233dc40f96c25f72e871315d013a07a0f54d1 | |
parent | A touch of style(9) (diff) | |
download | wireguard-openbsd-36e286aaa1a51639300ad3f7dd37249428efe9f0.tar.xz wireguard-openbsd-36e286aaa1a51639300ad3f7dd37249428efe9f0.zip |
Be consistent and always use SET() to set flags in xs->flags.
-rw-r--r-- | sys/scsi/cd.c | 20 | ||||
-rw-r--r-- | sys/scsi/scsi_base.c | 4 | ||||
-rw-r--r-- | sys/scsi/scsi_ioctl.c | 14 |
3 files changed, 19 insertions, 19 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index 151d78ca5e9..4818cd8f968 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.c,v 1.230 2019/09/29 17:57:36 krw Exp $ */ +/* $OpenBSD: cd.c,v 1.231 2019/11/21 22:31:26 krw Exp $ */ /* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */ /* @@ -1666,7 +1666,7 @@ dvd_auth(struct cd_softc *sc, union dvd_authinfo *a) cmd->bytes[8] = 8; cmd->bytes[9] = 0 | (0 << 6); xs->datalen = 8; - xs->flags |= SCSI_DATA_IN; + SET(xs->flags, SCSI_DATA_IN); error = scsi_xs_sync(xs); scsi_xs_put(xs); @@ -1680,7 +1680,7 @@ dvd_auth(struct cd_softc *sc, union dvd_authinfo *a) cmd->bytes[8] = 16; cmd->bytes[9] = 1 | (a->lsc.agid << 6); xs->datalen = 16; - xs->flags |= SCSI_DATA_IN; + SET(xs->flags, SCSI_DATA_IN); error = scsi_xs_sync(xs); scsi_xs_put(xs); @@ -1693,7 +1693,7 @@ dvd_auth(struct cd_softc *sc, union dvd_authinfo *a) cmd->bytes[8] = 12; cmd->bytes[9] = 2 | (a->lsk.agid << 6); xs->datalen = 12; - xs->flags |= SCSI_DATA_IN; + SET(xs->flags, SCSI_DATA_IN); error = scsi_xs_sync(xs); scsi_xs_put(xs); @@ -1708,7 +1708,7 @@ dvd_auth(struct cd_softc *sc, union dvd_authinfo *a) cmd->bytes[8] = 12; cmd->bytes[9] = 4 | (a->lstk.agid << 6); xs->datalen = 12; - xs->flags |= SCSI_DATA_IN; + SET(xs->flags, SCSI_DATA_IN); error = scsi_xs_sync(xs); scsi_xs_put(xs); @@ -1726,7 +1726,7 @@ dvd_auth(struct cd_softc *sc, union dvd_authinfo *a) cmd->bytes[8] = 8; cmd->bytes[9] = 5 | (a->lsasf.agid << 6); xs->datalen = 8; - xs->flags |= SCSI_DATA_IN; + SET(xs->flags, SCSI_DATA_IN); error = scsi_xs_sync(xs); scsi_xs_put(xs); @@ -1742,7 +1742,7 @@ dvd_auth(struct cd_softc *sc, union dvd_authinfo *a) buf[1] = 14; dvd_copy_challenge(&buf[4], a->hsc.chal); xs->datalen = 16; - xs->flags |= SCSI_DATA_OUT; + SET(xs->flags, SCSI_DATA_OUT); error = scsi_xs_sync(xs); scsi_xs_put(xs); @@ -1758,7 +1758,7 @@ dvd_auth(struct cd_softc *sc, union dvd_authinfo *a) buf[1] = 10; dvd_copy_key(&buf[4], a->hsk.key); xs->datalen = 12; - xs->flags |= SCSI_DATA_OUT; + SET(xs->flags, SCSI_DATA_OUT); error = scsi_xs_sync(xs); scsi_xs_put(xs); @@ -1783,7 +1783,7 @@ dvd_auth(struct cd_softc *sc, union dvd_authinfo *a) cmd->bytes[8] = 8; cmd->bytes[9] = 8 | (0 << 6); xs->datalen = 8; - xs->flags |= SCSI_DATA_IN; + SET(xs->flags, SCSI_DATA_IN); error = scsi_xs_sync(xs); scsi_xs_put(xs); @@ -1804,7 +1804,7 @@ dvd_auth(struct cd_softc *sc, union dvd_authinfo *a) buf[1] = 6; buf[4] = a->hrpcs.pdrc; xs->datalen = 8; - xs->flags |= SCSI_DATA_OUT; + SET(xs->flags, SCSI_DATA_OUT); error = scsi_xs_sync(xs); scsi_xs_put(xs); diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index 740a1ef4eb3..26d4b649192 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_base.c,v 1.238 2019/11/09 12:15:50 krw Exp $ */ +/* $OpenBSD: scsi_base.c,v 1.239 2019/11/21 22:31:27 krw Exp $ */ /* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */ /* @@ -816,7 +816,7 @@ scsi_init_inquiry(struct scsi_xfer *xs, u_int8_t flags, u_int8_t pagecode, xs->cmdlen = sizeof(*cmd); - xs->flags |= SCSI_DATA_IN; + SET(xs->flags, SCSI_DATA_IN); xs->data = data; xs->datalen = len; } diff --git a/sys/scsi/scsi_ioctl.c b/sys/scsi/scsi_ioctl.c index fddbfbadfcb..b3732055395 100644 --- a/sys/scsi/scsi_ioctl.c +++ b/sys/scsi/scsi_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_ioctl.c,v 1.57 2019/09/29 17:57:36 krw Exp $ */ +/* $OpenBSD: scsi_ioctl.c,v 1.58 2019/11/21 22:31:27 krw Exp $ */ /* $NetBSD: scsi_ioctl.c,v 1.23 1996/10/12 23:23:17 christos Exp $ */ /* @@ -122,7 +122,7 @@ scsi_ioc_cmd(struct scsi_link *link, scsireq_t *screq) } if (screq->flags & SCCMD_READ) - xs->flags |= SCSI_DATA_IN; + SET(xs->flags, SCSI_DATA_IN); if (screq->flags & SCCMD_WRITE) { if (screq->datalen > 0) { err = copyin(screq->databuf, xs->data, screq->datalen); @@ -130,10 +130,10 @@ scsi_ioc_cmd(struct scsi_link *link, scsireq_t *screq) goto err; } - xs->flags |= SCSI_DATA_OUT; + SET(xs->flags, SCSI_DATA_OUT); } - xs->flags |= SCSI_SILENT; /* User is responsible for errors. */ + SET(xs->flags, SCSI_SILENT); /* User is responsible for errors. */ xs->timeout = screq->timeout; xs->retries = 0; /* user must do the retries *//* ignored */ @@ -240,7 +240,7 @@ scsi_ioc_ata_cmd(struct scsi_link *link, atareq_t *atareq) } if (atareq->flags & ATACMD_READ) - xs->flags |= SCSI_DATA_IN; + SET(xs->flags, SCSI_DATA_IN); if (atareq->flags & ATACMD_WRITE) { if (atareq->datalen > 0) { err = copyin(atareq->databuf, xs->data, @@ -249,10 +249,10 @@ scsi_ioc_ata_cmd(struct scsi_link *link, atareq_t *atareq) goto err; } - xs->flags |= SCSI_DATA_OUT; + SET(xs->flags, SCSI_DATA_OUT); } - xs->flags |= SCSI_SILENT; /* User is responsible for errors. */ + SET(xs->flags, SCSI_SILENT); /* User is responsible for errors. */ xs->retries = 0; /* user must do the retries *//* ignored */ scsi_xs_sync(xs); |