summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2019-08-18 00:58:54 +0000
committerkrw <krw@openbsd.org>2019-08-18 00:58:54 +0000
commitffae5402680c142a8c6dc0c82f0ca1b010da52b4 (patch)
tree561acf7b19753f61ecdbf79fd224d9345a0df055
parentNuke some unused variables, tweak some declarations and (diff)
downloadwireguard-openbsd-ffae5402680c142a8c6dc0c82f0ca1b010da52b4.tar.xz
wireguard-openbsd-ffae5402680c142a8c6dc0c82f0ca1b010da52b4.zip
sc_buswidth field in struct scsi_link is redundant. Just use
adapter_link->adapter_buswidth, which supplied the value for sc_buswidth and is never changed.
-rw-r--r--sys/scsi/scsiconf.c9
-rw-r--r--sys/scsi/scsiconf.h3
2 files changed, 5 insertions, 7 deletions
diff --git a/sys/scsi/scsiconf.c b/sys/scsi/scsiconf.c
index e2f06809572..181f8302d41 100644
--- a/sys/scsi/scsiconf.c
+++ b/sys/scsi/scsiconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiconf.c,v 1.200 2019/08/17 15:31:41 krw Exp $ */
+/* $OpenBSD: scsiconf.c,v 1.201 2019/08/18 00:58:54 krw Exp $ */
/* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */
/*
@@ -161,12 +161,11 @@ scsibusattach(struct device *parent, struct device *self, void *aux)
sb->adapter_link = sc_link_proto;
if (sb->adapter_link->adapter_buswidth == 0)
sb->adapter_link->adapter_buswidth = 8;
- sb->sc_buswidth = sb->adapter_link->adapter_buswidth;
if (sb->adapter_link->luns == 0)
sb->adapter_link->luns = 8;
- printf(": %d targets", sb->sc_buswidth);
- if (sb->adapter_link->adapter_target < sb->sc_buswidth)
+ printf(": %d targets", sb->adapter_link->adapter_buswidth);
+ if (sb->adapter_link->adapter_target < sb->adapter_link->adapter_buswidth)
printf(", initiator %d", sb->adapter_link->adapter_target);
if (sb->adapter_link->port_wwn != 0x0 &&
sb->adapter_link->node_wwn != 0x0) {
@@ -216,7 +215,7 @@ scsi_activate_bus(struct scsibus_softc *sb, int act)
{
int target, r, rv = 0;
- for (target = 0; target < sb->sc_buswidth; target++) {
+ for (target = 0; target < sb->adapter_link->adapter_buswidth; target++) {
r = scsi_activate_target(sb, target, act);
if (r)
rv = r;
diff --git a/sys/scsi/scsiconf.h b/sys/scsi/scsiconf.h
index 6da37df997e..3b198a9c2cd 100644
--- a/sys/scsi/scsiconf.h
+++ b/sys/scsi/scsiconf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: scsiconf.h,v 1.167 2019/08/14 21:02:02 krw Exp $ */
+/* $OpenBSD: scsiconf.h,v 1.168 2019/08/18 00:58:54 krw Exp $ */
/* $NetBSD: scsiconf.h,v 1.35 1997/04/02 02:29:38 mycroft Exp $ */
/*
@@ -376,7 +376,6 @@ struct scsibus_softc {
struct device sc_dev;
struct scsi_link *adapter_link; /* prototype supplied by adapter */
SLIST_HEAD(, scsi_link) sc_link_list;
- u_int16_t sc_buswidth;
};
/*