summaryrefslogtreecommitdiff
path: root/sys/scsi
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2019-08-20 13:40:38 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2019-08-20 13:40:38 +0000
commit70ef9af3128aa63dffc8941499ccc9f4fdbafa8a (patch)
tree7ca68201dff4f184dcb4ade32df69cd826f89fe5 /sys/scsi
parent9eeac888b9ab07d64ceb65a57e6b4ca10e145e11 (diff)
scsi_probe_bus() always returns 0. Nobody but scsi_probe() even
pretended to care. So just make in a void, and explicitly return 0 in the appropriate case in scsi_probe().
Diffstat (limited to 'sys/scsi')
-rw-r--r--sys/scsi/scsiconf.c12
-rw-r--r--sys/scsi/scsiconf.h4
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c
index 112ee9683c5..bad3ec88d9b 100644
--- a/sys/scsi/scsiconf.c
+++ b/sys/scsi/scsiconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiconf.c,v 1.204 2019/08/18 23:58:24 krw Exp $ */
+/* $OpenBSD: scsiconf.c,v 1.205 2019/08/20 13:40:37 krw Exp $ */
/* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */
/*
@@ -328,7 +328,7 @@ scsibus_bioctl(struct device *dev, u_long cmd, caddr_t addr)
}
#endif
-int
+void
scsi_probe_bus(struct scsibus_softc *sb)
{
struct scsi_link *alink = sb->adapter_link;
@@ -336,8 +336,6 @@ scsi_probe_bus(struct scsibus_softc *sb)
for (i = 0; i < alink->adapter_buswidth; i++)
scsi_probe_target(sb, i);
-
- return (0);
}
int
@@ -405,8 +403,10 @@ dumbscan:
int
scsi_probe(struct scsibus_softc *sb, int target, int lun)
{
- if (target == -1 && lun == -1)
- return (scsi_probe_bus(sb));
+ if (target == -1 && lun == -1) {
+ scsi_probe_bus(sb);
+ return (0);
+ }
/* specific lun and wildcard target is bad */
if (target == -1)
diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h
index 3b198a9c2cd..e45c915c5f9 100644
--- a/sys/scsi/scsiconf.h
+++ b/sys/scsi/scsiconf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiconf.h,v 1.168 2019/08/18 00:58:54 krw Exp $ */
+/* $OpenBSD: scsiconf.h,v 1.169 2019/08/20 13:40:37 krw Exp $ */
/* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */
/*
@@ -508,7 +508,7 @@ void scsi_strvis(u_char *, u_char *, int);
int scsi_delay(struct scsi_xfer *, int);
int scsi_probe(struct scsibus_softc *, int, int);
-int scsi_probe_bus(struct scsibus_softc *);
+void scsi_probe_bus(struct scsibus_softc *);
int scsi_probe_target(struct scsibus_softc *, int);
int scsi_probe_lun(struct scsibus_softc *, int, int);