diff options
author | 2019-09-27 17:22:31 +0000 | |
---|---|---|
committer | 2019-09-27 17:22:31 +0000 | |
commit | 364ebb70ee3e2f8537ffe53251020bc589017d06 (patch) | |
tree | c1139a4d133826a3b065cfe53fef358eb4dd912b | |
parent | Shuffle and consolidate SCSIDEBUG declarations into fewer sections in (diff) | |
download | wireguard-openbsd-364ebb70ee3e2f8537ffe53251020bc589017d06.tar.xz wireguard-openbsd-364ebb70ee3e2f8537ffe53251020bc589017d06.zip |
Add/tweak #endif comments to make spelunking via grep more rewarding.
-rw-r--r-- | sys/scsi/cd.c | 14 | ||||
-rw-r--r-- | sys/scsi/cd.h | 4 | ||||
-rw-r--r-- | sys/scsi/ch.c | 6 | ||||
-rw-r--r-- | sys/scsi/mpath.c | 14 | ||||
-rw-r--r-- | sys/scsi/safte.c | 18 | ||||
-rw-r--r-- | sys/scsi/safte.h | 4 | ||||
-rw-r--r-- | sys/scsi/scsi_base.c | 24 | ||||
-rw-r--r-- | sys/scsi/scsi_debug.h | 10 | ||||
-rw-r--r-- | sys/scsi/scsi_disk.h | 4 | ||||
-rw-r--r-- | sys/scsi/scsi_ioctl.c | 10 | ||||
-rw-r--r-- | sys/scsi/scsiconf.c | 12 | ||||
-rw-r--r-- | sys/scsi/sd.c | 12 | ||||
-rw-r--r-- | sys/scsi/ses.c | 38 | ||||
-rw-r--r-- | sys/scsi/st.c | 6 |
14 files changed, 88 insertions, 88 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c index 9ac059ba67e..a068c6d0ad0 100644 --- a/sys/scsi/cd.c +++ b/sys/scsi/cd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.c,v 1.227 2019/09/01 15:03:32 krw Exp $ */ +/* $OpenBSD: cd.c,v 1.228 2019/09/27 17:22:31 krw Exp $ */ /* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */ /* @@ -143,7 +143,7 @@ int dvd_read_struct(struct cd_softc *, union dvd_struct *); #if defined(__macppc__) int cd_eject(void); -#endif +#endif /* __macppc__ */ struct cfattach cd_ca = { sizeof(struct cd_softc), cdmatch, cdattach, @@ -168,7 +168,7 @@ const struct scsi_inquiry_pattern cd_patterns[] = { #if 0 {T_CDROM, T_REMOV, /* more luns */ "PIONEER ", "CD-ROM DRM-600 ", ""}, -#endif +#endif /* 0 */ }; #define cdlookup(unit) (struct cd_softc *)disk_lookup(&cd_cd, (unit)) @@ -623,7 +623,7 @@ cd_buf_done(struct scsi_xfer *xs) case XS_SHORTSENSE: #ifdef SCSIDEBUG scsi_sense_print_debug(xs); -#endif +#endif /* SCSIDEBUG */ error = cd_interpret_sense(xs); if (error == 0) { bp->b_error = 0; @@ -920,7 +920,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) #if BYTE_ORDER == BIG_ENDIAN swap16_multi((u_int16_t *)&cte->addr, sizeof(cte->addr) / 2); -#endif +#endif /* BYTE_ORDER == BIG_ENDIAN */ } else cte->addr.lba = betoh32(cte->addr.lba); } @@ -961,7 +961,7 @@ cdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) #if BYTE_ORDER == BIG_ENDIAN swap16_multi((u_int16_t *)&cte->addr, sizeof(cte->addr) / 2); -#endif +#endif /* BYTE_ORDER == BIG_ENDIAN */ } else cte->addr.lba = betoh32(cte->addr.lba); if (sc->sc_link->quirks & ADEV_LITTLETOC) @@ -2246,4 +2246,4 @@ cd_eject(void) return (error); } -#endif +#endif /* __macppc__ */ diff --git a/sys/scsi/cd.h b/sys/scsi/cd.h index b679516fc98..0833d99c3dc 100644 --- a/sys/scsi/cd.h +++ b/sys/scsi/cd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cd.h,v 1.25 2009/12/16 10:51:28 dlg Exp $ */ +/* $OpenBSD: cd.h,v 1.26 2019/09/27 17:22:31 krw Exp $ */ /* $NetBSD: scsi_cd.h,v 1.6 1996/03/19 03:06:39 mycroft Exp $ */ /* @@ -270,4 +270,4 @@ struct scsi_read_dvd_structure_data { u_int8_t data[2048]; }; -#endif +#endif /* _SCSI_CD_H */ diff --git a/sys/scsi/ch.c b/sys/scsi/ch.c index 583c1b28a3a..46309d33817 100644 --- a/sys/scsi/ch.c +++ b/sys/scsi/ch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ch.c,v 1.53 2019/01/20 20:28:37 krw Exp $ */ +/* $OpenBSD: ch.c,v 1.54 2019/09/27 17:22:31 krw Exp $ */ /* $NetBSD: ch.c,v 1.26 1997/02/21 22:06:52 thorpej Exp $ */ /* @@ -680,7 +680,7 @@ ch_get_params(struct ch_softc *sc, int flags) #ifdef CHANGER_DEBUG printf("%s: could not sense element address page\n", sc->sc_dev.dv_xname); -#endif +#endif /* CHANGER_DEBUG */ dma_free(data, sizeof(*data)); return (error); } @@ -707,7 +707,7 @@ ch_get_params(struct ch_softc *sc, int flags) #ifdef CHANGER_DEBUG printf("%s: could not sense capabilities page\n", sc->sc_dev.dv_xname); -#endif +#endif /* CHANGER_DEBUG */ dma_free(data, sizeof(*data)); return (error); } diff --git a/sys/scsi/mpath.c b/sys/scsi/mpath.c index 9c016f24552..b789c74c785 100644 --- a/sys/scsi/mpath.c +++ b/sys/scsi/mpath.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpath.c,v 1.42 2019/02/10 16:42:35 phessler Exp $ */ +/* $OpenBSD: mpath.c,v 1.43 2019/09/27 17:22:31 krw Exp $ */ /* * Copyright (c) 2009 David Gwynne <dlg@openbsd.org> @@ -165,7 +165,7 @@ mpath_next_path(struct mpath_dev *d) #ifdef DIAGNOSTIC if (d == NULL) panic("%s: d is NULL", __func__); -#endif +#endif /* DIAGNOSTIC */ p = d->d_next_path; if (p != NULL) { @@ -190,7 +190,7 @@ mpath_cmd(struct scsi_xfer *xs) #ifdef DIAGNOSTIC if (d == NULL) panic("mpath_cmd issued against nonexistent device"); -#endif +#endif /* DIAGNOSTIC */ if (ISSET(xs->flags, SCSI_POLL)) { mtx_enter(&d->d_mtx); @@ -320,7 +320,7 @@ mpath_done(struct scsi_xfer *mxs) #ifdef DIAGNOSTIC default: panic("unexpected return from checksense"); -#endif +#endif /* DIAGNOSTIC */ } break; } @@ -405,7 +405,7 @@ mpath_minphys(struct buf *bp, struct scsi_link *link) #ifdef DIAGNOSTIC if (d == NULL) panic("mpath_minphys against nonexistent device"); -#endif +#endif /* DIAGNOSTIC */ mtx_enter(&d->d_mtx); TAILQ_FOREACH(g, &d->d_groups, g_entry) { @@ -450,7 +450,7 @@ mpath_path_attach(struct mpath_path *p, u_int g_id, const struct mpath_ops *ops) panic("mpath_path_attach: NULL link"); if (p->p_group != NULL) panic("mpath_path_attach: group is not NULL"); -#endif +#endif /* DIAGNOSTIC */ for (target = 0; target < MPATH_BUSWIDTH; target++) { if ((d = sc->sc_devs[target]) == NULL) @@ -549,7 +549,7 @@ mpath_path_detach(struct mpath_path *p) #ifdef DIAGNOSTIC if (g == NULL) panic("mpath: detaching a path from a nonexistent bus"); -#endif +#endif /* DIAGNOSTIC */ d = g->g_dev; p->p_group = NULL; diff --git a/sys/scsi/safte.c b/sys/scsi/safte.c index 395f4d4a41c..54cd18df2ef 100644 --- a/sys/scsi/safte.c +++ b/sys/scsi/safte.c @@ -1,4 +1,4 @@ -/* $OpenBSD: safte.c,v 1.57 2019/09/19 17:48:21 krw Exp $ */ +/* $OpenBSD: safte.c,v 1.58 2019/09/27 17:22:31 krw Exp $ */ /* * Copyright (c) 2005 David Gwynne <dlg@openbsd.org> @@ -30,7 +30,7 @@ #if NBIO > 0 #include <dev/biovar.h> -#endif +#endif /* NBIO > 0 */ #include <scsi/scsi_all.h> #include <scsi/scsiconf.h> @@ -42,7 +42,7 @@ int safte_debug = 1; #else #define DPRINTF(x) /* x */ -#endif +#endif /* SAFTE_DEBUG */ int safte_match(struct device *, void *, void *); @@ -82,7 +82,7 @@ struct safte_softc { #if NBIO > 0 int sc_nslots; u_int8_t *sc_slots; -#endif +#endif /* NBIO > 0 */ }; struct cfattach safte_ca = { @@ -101,7 +101,7 @@ void safte_read_encstat(void *); #if NBIO > 0 int safte_ioctl(struct device *, u_long, caddr_t); int safte_bio_blink(struct safte_softc *, struct bioc_blink *); -#endif +#endif /* NBIO > 0 */ int64_t safte_temp2uK(u_int8_t, int); @@ -185,7 +185,7 @@ safte_attach(struct device *parent, struct device *self, void *aux) sc->sc_nsensors = 0; #if NBIO > 0 sc->sc_nslots = 0; -#endif +#endif /* NBIO > 0 */ if (safte_read_config(sc) != 0) { printf("%s: unable to read enclosure configuration\n", @@ -217,7 +217,7 @@ safte_attach(struct device *parent, struct device *self, void *aux) sc->sc_nslots = 0; } else i++; -#endif +#endif /* NBIO > 0 */ if (i) /* if we're doing something, then preinit encbuf and sensors */ safte_read_encstat(sc); @@ -238,7 +238,7 @@ safte_detach(struct device *self, int flags) #if NBIO > 0 if (sc->sc_nslots > 0) bio_unregister(self); -#endif +#endif /* NBIO > 0 */ if (sc->sc_nsensors > 0) { sensordev_deinstall(&sc->sc_sensordev); @@ -362,7 +362,7 @@ safte_read_config(struct safte_softc *sc) #if NBIO > 0 sc->sc_nslots = config->nslots; sc->sc_slots = (u_int8_t *)(sc->sc_encbuf + j); -#endif +#endif /* NBIO > 0 */ j += config->nslots; if (config->doorlock) { diff --git a/sys/scsi/safte.h b/sys/scsi/safte.h index 2ebbbf56848..b3071ba09f1 100644 --- a/sys/scsi/safte.h +++ b/sys/scsi/safte.h @@ -1,4 +1,4 @@ -/* $OpenBSD: safte.h,v 1.6 2006/01/08 06:28:42 dlg Exp $ */ +/* $OpenBSD: safte.h,v 1.7 2019/09/27 17:22:31 krw Exp $ */ /* * Copyright (c) 2005 David Gwynne <dlg@openbsd.org> @@ -29,7 +29,7 @@ struct safte_inq { u_int8_t revision[4]; #ifdef notyet u_int8_t reserved[2]; -#endif +#endif /* notyet */ } __packed; #define SAFTE_INQ_LEN 54 diff --git a/sys/scsi/scsi_base.c b/sys/scsi/scsi_base.c index bf168a83fb0..1c3cf64295a 100644 --- a/sys/scsi/scsi_base.c +++ b/sys/scsi/scsi_base.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_base.c,v 1.233 2019/09/27 16:03:45 krw Exp $ */ +/* $OpenBSD: scsi_base.c,v 1.234 2019/09/27 17:22:31 krw Exp $ */ /* $NetBSD: scsi_base.c,v 1.43 1997/04/02 02:29:36 mycroft Exp $ */ /* @@ -122,7 +122,7 @@ scsi_init(void) #if defined(SCSI_DELAY) && SCSI_DELAY > 0 /* Historical. Older buses may need a moment to stabilize. */ delay(1000000 * SCSI_DELAY); -#endif +#endif /* SCSI_DELAY && SCSI_DELAY > 0 */ /* Initialize the scsi_xfer pool. */ pool_init(&scsi_xfer_pool, sizeof(struct scsi_xfer), 0, IPL_BIO, 0, @@ -274,7 +274,7 @@ scsi_iopool_destroy(struct scsi_iopool *iopl) #ifdef DIAGNOSTIC else panic("scsi_iopool_destroy: scsi_iohandler on pool"); -#endif +#endif /* DIAGNOSTIC */ } mtx_leave(&iopl->mtx); @@ -296,7 +296,7 @@ scsi_default_put(void *iocookie, void *io) #ifdef DIAGNOSTIC if (io != SCSI_IOPOOL_POISON) panic("unexpected opening returned"); -#endif +#endif /* DIAGNOSTIC */ } /* @@ -331,7 +331,7 @@ scsi_ioh_add(struct scsi_iohandler *ioh) break; default: panic("scsi_ioh_add: unexpected state %u", ioh->q_state); -#endif +#endif /* DIAGNOSTIC */ } mtx_leave(&iopl->mtx); @@ -359,7 +359,7 @@ scsi_ioh_del(struct scsi_iohandler *ioh) break; default: panic("scsi_ioh_del: unexpected state %u", ioh->q_state); -#endif +#endif /* DIAGNOSTIC */ } mtx_leave(&iopl->mtx); @@ -681,7 +681,7 @@ scsi_link_shutdown(struct scsi_link *link) #ifdef DIAGNOSTIC else panic("scsi_link_shutdown: scsi_xshandler on link"); -#endif +#endif /* DIAGNOSTIC */ } ioh = TAILQ_FIRST(&iopl->queue); @@ -693,7 +693,7 @@ scsi_link_shutdown(struct scsi_link *link) if (xsh->ioh.handler == scsi_xsh_ioh && xsh->link == link) panic("scsi_link_shutdown: scsi_xshandler on pool"); -#endif +#endif /* DIAGNOSTIC */ if (xsh->ioh.handler == scsi_xs_get_done && xsh->link == link) { @@ -1307,7 +1307,7 @@ scsi_xs_exec(struct scsi_xfer *xs) if (xs->datalen && (xs->flags & SCSI_DATA_OUT)) scsi_show_mem(xs->data, min(64, xs->datalen)); } -#endif +#endif /* SCSIDEBUG */ /* The adapter's scsi_cmd() is responsible for calling scsi_done(). */ KERNEL_LOCK(); @@ -1345,7 +1345,7 @@ scsi_xs_sync(struct scsi_xfer *xs) panic("xs->cookie != NULL in scsi_xs_sync"); if (xs->done != NULL) panic("xs->done != NULL in scsi_xs_sync"); -#endif +#endif /* DIAGNOSTIC */ /* * If we cant sleep while waiting for completion, get the adapter to @@ -1407,7 +1407,7 @@ scsi_xs_error(struct scsi_xfer *xs) case XS_SHORTSENSE: #ifdef SCSIDEBUG scsi_sense_print_debug(xs); -#endif +#endif /* SCSIDEBUG */ error = xs->sc_link->interpret_sense(xs); SC_DEBUG(xs->sc_link, SDEV_DB3, ("scsi_interpret_sense returned %#x\n", error)); @@ -1606,7 +1606,7 @@ scsi_interpret_sense(struct scsi_xfer *xs) /* SCSIDEBUG would mean it has already been printed. */ if (skey && (xs->flags & SCSI_SILENT) == 0) scsi_print_sense(xs); -#endif /* SCSIDEBUG */ +#endif /* ~SCSIDEBUG */ return (error); } diff --git a/sys/scsi/scsi_debug.h b/sys/scsi/scsi_debug.h index eff4056ceb3..988a874e05d 100644 --- a/sys/scsi/scsi_debug.h +++ b/sys/scsi/scsi_debug.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_debug.h,v 1.14 2019/09/27 16:03:45 krw Exp $ */ +/* $OpenBSD: scsi_debug.h,v 1.15 2019/09/27 17:22:31 krw Exp $ */ /* $NetBSD: scsi_debug.h,v 1.7 1996/10/12 23:23:16 christos Exp $ */ /* @@ -22,16 +22,16 @@ /* targets and LUNs we want to debug */ #ifndef SCSIDEBUG_BUSES #define SCSIDEBUG_BUSES 0 -#endif +#endif /* ~SCSIDBUG_BUSES */ #ifndef SCSIDEBUG_TARGETS #define SCSIDEBUG_TARGETS 0 -#endif +#endif /* ~SCSIDEBUG_TARGETS */ #ifndef SCSIDEBUG_LUNS #define SCSIDEBUG_LUNS 0 -#endif +#endif /* ~SCSIDEBUG_LUNS */ #ifndef SCSIDEBUG_LEVEL #define SCSIDEBUG_LEVEL (SDEV_DB1|SDEV_DB2) -#endif +#endif /* ~SCSIDEBUG_LEVEL */ extern u_int32_t scsidebug_buses, scsidebug_targets, scsidebug_luns; extern int scsidebug_level; diff --git a/sys/scsi/scsi_disk.h b/sys/scsi/scsi_disk.h index 9359e62b5ec..a74a852bfd1 100644 --- a/sys/scsi/scsi_disk.h +++ b/sys/scsi/scsi_disk.h @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_disk.h,v 1.36 2019/09/19 16:07:33 krw Exp $ */ +/* $OpenBSD: scsi_disk.h,v 1.37 2019/09/27 17:22:31 krw Exp $ */ /* $NetBSD: scsi_disk.h,v 1.10 1996/07/05 16:19:05 christos Exp $ */ /* @@ -109,7 +109,7 @@ struct scsi_initialization_pattern_descriptor { u_int8_t pattern_length[2]; #if 0 u_int8_t pattern[...]; -#endif +#endif /* 0 */ }; /* diff --git a/sys/scsi/scsi_ioctl.c b/sys/scsi/scsi_ioctl.c index bdaec315636..efdd65a7f93 100644 --- a/sys/scsi/scsi_ioctl.c +++ b/sys/scsi/scsi_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsi_ioctl.c,v 1.54 2018/04/27 08:08:06 guenther Exp $ */ +/* $OpenBSD: scsi_ioctl.c,v 1.55 2019/09/27 17:22:31 krw Exp $ */ /* $NetBSD: scsi_ioctl.c,v 1.23 1996/10/12 23:23:17 christos Exp $ */ /* @@ -150,7 +150,7 @@ scsi_ioc_cmd(struct scsi_link *link, scsireq_t *screq) case XS_SENSE: #ifdef SCSIDEBUG scsi_sense_print_debug(xs); -#endif +#endif /* SCSIDEBUG */ screq->senselen_used = min(sizeof(xs->sense), sizeof(screq->sense)); memcpy(screq->sense, &xs->sense, screq->senselen_used); @@ -159,7 +159,7 @@ scsi_ioc_cmd(struct scsi_link *link, scsireq_t *screq) case XS_SHORTSENSE: #ifdef SCSIDEBUG scsi_sense_print_debug(xs); -#endif +#endif /* SCSIDEBUG */ printf("XS_SHORTSENSE\n"); screq->senselen_used = min(sizeof(xs->sense), sizeof(screq->sense)); @@ -267,7 +267,7 @@ scsi_ioc_ata_cmd(struct scsi_link *link, atareq_t *atareq) case XS_SHORTSENSE: #ifdef SCSIDEBUG scsi_sense_print_debug(xs); -#endif +#endif /* SCSIDEBUG */ /* XXX this is not right */ case XS_NOERROR: atareq->retsts = ATACMD_OK; @@ -356,7 +356,7 @@ scsi_do_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag) default: #ifdef DIAGNOSTIC panic("scsi_do_ioctl: impossible cmd (%#lx)", cmd); -#endif +#endif /* DIAGNOSTIC */ return (0); } } diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c index 3228043072f..9de0b90dc0b 100644 --- a/sys/scsi/scsiconf.c +++ b/sys/scsi/scsiconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scsiconf.c,v 1.216 2019/09/27 16:03:45 krw Exp $ */ +/* $OpenBSD: scsiconf.c,v 1.217 2019/09/27 17:22:31 krw Exp $ */ /* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */ /* @@ -65,7 +65,7 @@ #include <sys/ioctl.h> #include <sys/scsiio.h> #include <dev/biovar.h> -#endif +#endif /* NBIO > 0 */ /* * Declarations @@ -91,7 +91,7 @@ int scsibussubmatch(struct device *, void *, void *); #if NBIO > 0 int scsibus_bioctl(struct device *, u_long, caddr_t); -#endif +#endif /* NBIO > 0 */ struct cfattach scsibus_ca = { sizeof(struct scsibus_softc), scsibusmatch, scsibusattach, @@ -167,7 +167,7 @@ scsibusattach(struct device *parent, struct device *self, void *aux) #if NBIO > 0 if (bio_register(&sb->sc_dev, scsibus_bioctl) != 0) printf("%s: unable to register bio\n", sb->sc_dev.dv_xname); -#endif +#endif /* NBIO > 0 */ scsi_probe(sb, -1, -1); } @@ -263,7 +263,7 @@ scsibusdetach(struct device *dev, int type) #if NBIO > 0 bio_unregister(&sb->sc_dev); -#endif +#endif /* NBIO > 0 */ error = scsi_detach(sb, -1, -1, type); if (error != 0) @@ -309,7 +309,7 @@ scsibus_bioctl(struct device *dev, u_long cmd, caddr_t addr) return (ENOTTY); } } -#endif +#endif /* NBIO > 0 */ void scsi_probe_bus(struct scsibus_softc *sb) diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index b5232264263..884b72be831 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sd.c,v 1.282 2019/09/20 15:35:42 krw Exp $ */ +/* $OpenBSD: sd.c,v 1.283 2019/09/27 17:22:31 krw Exp $ */ /* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */ /*- @@ -243,7 +243,7 @@ sdattach(struct device *parent, struct device *self, void *aux) default: panic("sdattach: unknown result (%#x) from get_parms", result); break; -#endif +#endif /* DIAGNOSTIC */ } /* @@ -767,7 +767,7 @@ sd_buf_done(struct scsi_xfer *xs) case XS_SHORTSENSE: #ifdef SCSIDEBUG scsi_sense_print_debug(xs); -#endif +#endif /* SCSIDEBUG */ error = sd_interpret_sense(xs); if (error == 0) { bp->b_error = 0; @@ -1345,7 +1345,7 @@ sddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) /* Make sure it was initialized. */ if ((sc->sc_link->flags & SDEV_MEDIA_LOADED) != SDEV_MEDIA_LOADED) return ENXIO; -#endif +#endif /* 0 */ /* Convert to disk sectors. Request must be a multiple of size. */ lp = sc->sc_dk.dk_label; @@ -1394,7 +1394,7 @@ sddump(dev_t dev, daddr_t blkno, caddr_t va, size_t size) printf("sd%d: dump addr 0x%x, blk %lld\n", unit, va, (long long)blkno); delay(500 * 1000); /* half a second */ -#endif /* SD_DUMP_NOT_TRUSTED */ +#endif /* ~SD_DUMP_NOT_TRUSTED */ /* update block count */ totwrt -= nwrt; @@ -1688,7 +1688,7 @@ sd_vpd_thin(struct sd_softc *sc, int flags) sc->params.unmap_descs = 1; /* WRITE SAME 16 only does one */ } else rv = EOPNOTSUPP; -#endif +#endif /* notyet */ done: dma_free(pg, sizeof(*pg)); diff --git a/sys/scsi/ses.c b/sys/scsi/ses.c index e0ce574470c..eff7c2e3f43 100644 --- a/sys/scsi/ses.c +++ b/sys/scsi/ses.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ses.c,v 1.57 2019/09/01 15:03:32 krw Exp $ */ +/* $OpenBSD: ses.c,v 1.58 2019/09/27 17:22:31 krw Exp $ */ /* * Copyright (c) 2005 David Gwynne <dlg@openbsd.org> @@ -30,7 +30,7 @@ #if NBIO > 0 #include <dev/biovar.h> -#endif +#endif /* NBIO > 0 */ #include <scsi/scsi_all.h> #include <scsi/scsiconf.h> @@ -44,7 +44,7 @@ int sesdebug = 2; #else #define DPRINTF(x...) /* x */ #define DPRINTFN(n,x...) /* n: x */ -#endif +#endif /* SES_DEBUG */ int ses_match(struct device *, void *, void *); void ses_attach(struct device *, struct device *, void *); @@ -64,7 +64,7 @@ struct ses_slot { TAILQ_ENTRY(ses_slot) sl_entry; }; -#endif +#endif /* NBIO > 0 */ struct ses_softc { struct device sc_dev; @@ -81,7 +81,7 @@ struct ses_softc { #if NBIO > 0 TAILQ_HEAD(, ses_slot) sc_slots; -#endif +#endif /* NBIO > 0 */ TAILQ_HEAD(, ses_sensor) sc_sensors; struct ksensordev sc_sensordev; struct sensor_task *sc_sensortask; @@ -108,7 +108,7 @@ void ses_refresh_sensors(void *); int ses_ioctl(struct device *, u_long, caddr_t); int ses_write_config(struct ses_softc *); int ses_bio_blink(struct ses_softc *, struct bioc_blink *); -#endif +#endif /* NBIO > 0 */ void ses_psu2sensor(struct ses_softc *, struct ses_sensor *); void ses_cool2sensor(struct ses_softc *, struct ses_sensor *); @@ -117,7 +117,7 @@ void ses_temp2sensor(struct ses_softc *, struct ses_sensor *); #ifdef SES_DEBUG void ses_dump_enc_desc(struct ses_enc_desc *); char *ses_dump_enc_string(u_char *, ssize_t); -#endif +#endif /* SES_DEBUG */ int ses_match(struct device *parent, void *match, void *aux) @@ -149,7 +149,7 @@ ses_attach(struct device *parent, struct device *self, void *aux) struct ses_sensor *sensor; #if NBIO > 0 struct ses_slot *slot; -#endif +#endif /* NBIO > 0 */ sc->sc_link = sa->sa_sc_link; sa->sa_sc_link->device_softc = sc; @@ -200,12 +200,12 @@ ses_attach(struct device *parent, struct device *self, void *aux) free(slot, M_DEVBUF, sizeof(*slot)); } } -#endif +#endif /* NBIO > 0 */ if (TAILQ_EMPTY(&sc->sc_sensors) #if NBIO > 0 && TAILQ_EMPTY(&sc->sc_slots) -#endif +#endif /* NBIO > 0 */ ) { dma_free(sc->sc_buf, sc->sc_buflen); sc->sc_buf = NULL; @@ -219,7 +219,7 @@ ses_detach(struct device *self, int flags) struct ses_sensor *sensor; #if NBIO > 0 struct ses_slot *slot; -#endif +#endif /* NBIO > 0 */ rw_enter_write(&sc->sc_lock); @@ -232,7 +232,7 @@ ses_detach(struct device *self, int flags) free(slot, M_DEVBUF, sizeof(*slot)); } } -#endif +#endif /* NBIO > 0 */ if (!TAILQ_EMPTY(&sc->sc_sensors)) { sensordev_deinstall(&sc->sc_sensordev); @@ -262,7 +262,7 @@ ses_read_config(struct ses_softc *sc) struct ses_type_desc *tdh, *tdlist; #ifdef SES_DEBUG struct ses_enc_desc *desc; -#endif +#endif /* SES_DEBUG */ struct ses_enc_hdr *enc; struct scsi_xfer *xs; u_char *buf, *p; @@ -406,7 +406,7 @@ ses_make_sensors(struct ses_softc *sc, struct ses_type_desc *types, int ntypes) struct ses_sensor *sensor; #if NBIO > 0 struct ses_slot *slot; -#endif +#endif /* NBIO > 0 */ enum sensor_type stype; char *fmt; int i, j; @@ -420,7 +420,7 @@ ses_make_sensors(struct ses_softc *sc, struct ses_type_desc *types, int ntypes) TAILQ_INIT(&sc->sc_sensors); #if NBIO > 0 TAILQ_INIT(&sc->sc_slots); -#endif +#endif /* NBIO > 0 */ status = (struct ses_status *)(sc->sc_buf + SES_STAT_HDRLEN); for (i = 0; i < ntypes; i++) { @@ -454,7 +454,7 @@ ses_make_sensors(struct ses_softc *sc, struct ses_type_desc *types, int ntypes) sl_entry); continue; -#endif +#endif /* NBIO > 0 */ case SES_T_POWERSUPPLY: stype = SENSOR_INDICATOR; @@ -501,7 +501,7 @@ error: TAILQ_REMOVE(&sc->sc_slots, slot, sl_entry); free(slot, M_DEVBUF, sizeof(*slot)); } -#endif +#endif /* NBIO > 0 */ while (!TAILQ_EMPTY(&sc->sc_sensors)) { sensor = TAILQ_FIRST(&sc->sc_sensors); TAILQ_REMOVE(&sc->sc_sensors, sensor, se_entry); @@ -686,7 +686,7 @@ ses_bio_blink(struct ses_softc *sc, struct bioc_blink *blink) return (0); } -#endif +#endif /* NBIO > 0 */ void ses_psu2sensor(struct ses_softc *sc, struct ses_sensor *s) @@ -763,7 +763,7 @@ ses_dump_enc_desc(struct ses_enc_desc *desc) memset(str, 0, sizeof(str)); memcpy(str, desc->logical_id, sizeof(desc->logical_id)); DPRINTF("logical_id: %s", str); -#endif +#endif /* 0 */ memset(str, 0, sizeof(str)); memcpy(str, desc->vendor_id, sizeof(desc->vendor_id)); diff --git a/sys/scsi/st.c b/sys/scsi/st.c index 461674b7fcb..8eb52500900 100644 --- a/sys/scsi/st.c +++ b/sys/scsi/st.c @@ -1,4 +1,4 @@ -/* $OpenBSD: st.c,v 1.165 2019/09/10 23:07:46 krw Exp $ */ +/* $OpenBSD: st.c,v 1.166 2019/09/27 17:22:31 krw Exp $ */ /* $NetBSD: st.c,v 1.71 1997/02/21 23:03:49 thorpej Exp $ */ /* @@ -959,7 +959,7 @@ st_buf_done(struct scsi_xfer *xs) case XS_SHORTSENSE: #ifdef SCSIDEBUG scsi_sense_print_debug(xs); -#endif +#endif /* SCSIDEBUG */ error = st_interpret_sense(xs); if (error == 0) { bp->b_error = 0; @@ -1190,7 +1190,7 @@ stioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct proc *p) case MTIOCHLOCATE: error = st_setpos(st, 1, (u_int32_t *) arg); break; -#endif +#endif /* 0 */ default: error = scsi_do_ioctl(st->sc_link, cmd, arg, flag); |