summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2020-07-13 13:43:32 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2020-07-13 13:43:32 +0000
commit1d4d3d59e3e0cdf0cb9e740fbb3116020d89fdfe (patch)
tree063e74adc41bb9da858ee0eeda1570a757fb1a84
parentfbf4976285ea93ec81944869413c7a022fdf5415 (diff)
Remove some pointless casting of void * when assigning one
(scsi_link.adapter_softc) to a pointer of a particular softc type.
-rw-r--r--sys/dev/ic/aic79xx_openbsd.c6
-rw-r--r--sys/dev/ic/aic7xxx_openbsd.c10
-rw-r--r--sys/dev/ic/ami.c4
-rw-r--r--sys/dev/ic/mfi.c6
-rw-r--r--sys/dev/ic/mpi.c6
-rw-r--r--sys/dev/ic/oosiop.c4
-rw-r--r--sys/dev/ic/siop.c6
-rw-r--r--sys/dev/ic/trm.c4
-rw-r--r--sys/dev/pci/mfii.c6
-rw-r--r--sys/dev/pci/mpii.c6
-rw-r--r--sys/dev/sdmmc/sdmmc_scsi.c4
11 files changed, 31 insertions, 31 deletions
diff --git a/sys/dev/ic/aic79xx_openbsd.c b/sys/dev/ic/aic79xx_openbsd.c
index 30fc9169b8f..aeae89394e7 100644
--- a/sys/dev/ic/aic79xx_openbsd.c
+++ b/sys/dev/ic/aic79xx_openbsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic79xx_openbsd.c,v 1.53 2020/07/11 13:34:06 krw Exp $ */
+/* $OpenBSD: aic79xx_openbsd.c,v 1.54 2020/07/13 13:43:31 krw Exp $ */
/*
* Copyright (c) 2004 Milos Urbanek, Kenneth R. Westerback & Marco Peereboom
@@ -257,7 +257,7 @@ ahd_action(struct scsi_xfer *xs)
u_int16_t quirks;
SC_DEBUG(xs->sc_link, SDEV_DB3, ("ahd_action\n"));
- ahd = (struct ahd_softc *)xs->sc_link->adapter_softc;
+ ahd = xs->sc_link->adapter_softc;
target_id = xs->sc_link->target;
our_id = SCSI_SCSI_ID(ahd, xs->sc_link);
@@ -322,7 +322,7 @@ ahd_execute_scb(void *arg, bus_dma_segment_t *dm_segs, int nsegments)
xs = scb->xs;
xs->error = CAM_REQ_INPROG;
xs->status = 0;
- ahd = (struct ahd_softc *)xs->sc_link->adapter_softc;
+ ahd = xs->sc_link->adapter_softc;
if (nsegments != 0) {
void *sg;
diff --git a/sys/dev/ic/aic7xxx_openbsd.c b/sys/dev/ic/aic7xxx_openbsd.c
index 44ff699e848..bed97bd8442 100644
--- a/sys/dev/ic/aic7xxx_openbsd.c
+++ b/sys/dev/ic/aic7xxx_openbsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aic7xxx_openbsd.c,v 1.63 2020/07/11 14:25:59 krw Exp $ */
+/* $OpenBSD: aic7xxx_openbsd.c,v 1.64 2020/07/13 13:43:31 krw Exp $ */
/* $NetBSD: aic7xxx_osm.c,v 1.14 2003/11/02 11:07:44 wiz Exp $ */
/*
@@ -257,7 +257,7 @@ ahc_action(struct scsi_xfer *xs)
u_int our_id;
SC_DEBUG(xs->sc_link, SDEV_DB3, ("ahc_action\n"));
- ahc = (struct ahc_softc *)xs->sc_link->adapter_softc;
+ ahc = xs->sc_link->adapter_softc;
target_id = xs->sc_link->target;
our_id = SCSI_SCSI_ID(ahc, xs->sc_link);
@@ -311,7 +311,7 @@ ahc_execute_scb(void *arg, bus_dma_segment_t *dm_segs, int nsegments)
xs = scb->xs;
xs->error = CAM_REQ_INPROG;
xs->status = 0;
- ahc = (struct ahc_softc *)xs->sc_link->adapter_softc;
+ ahc = xs->sc_link->adapter_softc;
if (nsegments != 0) {
struct ahc_dma_seg *sg;
@@ -553,8 +553,8 @@ ahc_timeout(void *arg)
int found;
char channel;
- scb = (struct scb *)arg;
- ahc = (struct ahc_softc *)scb->xs->sc_link->adapter_softc;
+ scb = arg;
+ ahc = scb->xs->sc_link->adapter_softc;
s = splbio();
diff --git a/sys/dev/ic/ami.c b/sys/dev/ic/ami.c
index 43c9a1228bf..c2e70358c02 100644
--- a/sys/dev/ic/ami.c
+++ b/sys/dev/ic/ami.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ami.c,v 1.248 2020/07/12 00:48:59 krw Exp $ */
+/* $OpenBSD: ami.c,v 1.249 2020/07/13 13:43:31 krw Exp $ */
/*
* Copyright (c) 2001 Michael Shalayeff
@@ -1547,7 +1547,7 @@ ami_intr(void *v)
int
ami_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag)
{
- struct ami_softc *sc = (struct ami_softc *)link->adapter_softc;
+ struct ami_softc *sc = link->adapter_softc;
/* struct device *dev = (struct device *)link->device_softc; */
/* u_int8_t target = link->target; */
diff --git a/sys/dev/ic/mfi.c b/sys/dev/ic/mfi.c
index 1ac55d859da..9e553a3c8fe 100644
--- a/sys/dev/ic/mfi.c
+++ b/sys/dev/ic/mfi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfi.c,v 1.179 2020/06/27 17:28:58 krw Exp $ */
+/* $OpenBSD: mfi.c,v 1.180 2020/07/13 13:43:31 krw Exp $ */
/*
* Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
*
@@ -1404,7 +1404,7 @@ done:
int
mfi_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag)
{
- struct mfi_softc *sc = (struct mfi_softc *)link->adapter_softc;
+ struct mfi_softc *sc = link->adapter_softc;
DNPRINTF(MFI_D_IOCTL, "%s: mfi_scsi_ioctl\n", DEVNAME(sc));
@@ -1426,7 +1426,7 @@ mfi_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag)
int
mfi_ioctl_cache(struct scsi_link *link, u_long cmd, struct dk_cache *dc)
{
- struct mfi_softc *sc = (struct mfi_softc *)link->adapter_softc;
+ struct mfi_softc *sc = link->adapter_softc;
int rv, wrenable, rdenable;
struct mfi_ld_prop ldp;
union mfi_mbox mbox;
diff --git a/sys/dev/ic/mpi.c b/sys/dev/ic/mpi.c
index 5cbb80bd304..b8b9853aeb5 100644
--- a/sys/dev/ic/mpi.c
+++ b/sys/dev/ic/mpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpi.c,v 1.216 2020/07/11 21:35:55 krw Exp $ */
+/* $OpenBSD: mpi.c,v 1.217 2020/07/13 13:43:31 krw Exp $ */
/*
* Copyright (c) 2005, 2006, 2009 David Gwynne <dlg@openbsd.org>
@@ -2956,7 +2956,7 @@ mpi_req_cfg_page(struct mpi_softc *sc, u_int32_t address, int flags,
int
mpi_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag)
{
- struct mpi_softc *sc = (struct mpi_softc *)link->adapter_softc;
+ struct mpi_softc *sc = link->adapter_softc;
DNPRINTF(MPI_D_IOCTL, "%s: mpi_scsi_ioctl\n", DEVNAME(sc));
@@ -2982,7 +2982,7 @@ mpi_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag)
int
mpi_ioctl_cache(struct scsi_link *link, u_long cmd, struct dk_cache *dc)
{
- struct mpi_softc *sc = (struct mpi_softc *)link->adapter_softc;
+ struct mpi_softc *sc = link->adapter_softc;
struct mpi_ccb *ccb;
int len, rv;
struct mpi_cfg_hdr hdr;
diff --git a/sys/dev/ic/oosiop.c b/sys/dev/ic/oosiop.c
index 1a1bd32bb48..b972895ce75 100644
--- a/sys/dev/ic/oosiop.c
+++ b/sys/dev/ic/oosiop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: oosiop.c,v 1.29 2020/07/11 13:34:06 krw Exp $ */
+/* $OpenBSD: oosiop.c,v 1.30 2020/07/13 13:43:31 krw Exp $ */
/* $NetBSD: oosiop.c,v 1.4 2003/10/29 17:45:55 tsutsui Exp $ */
/*
@@ -723,7 +723,7 @@ oosiop_scsicmd(struct scsi_xfer *xs)
int s, err;
int dopoll;
- sc = (struct oosiop_softc *)xs->sc_link->adapter_softc;
+ sc = xs->sc_link->adapter_softc;
s = splbio();
diff --git a/sys/dev/ic/siop.c b/sys/dev/ic/siop.c
index 88c66c713cd..fbeb2bce494 100644
--- a/sys/dev/ic/siop.c
+++ b/sys/dev/ic/siop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: siop.c,v 1.79 2020/07/04 16:41:23 krw Exp $ */
+/* $OpenBSD: siop.c,v 1.80 2020/07/13 13:43:31 krw Exp $ */
/* $NetBSD: siop.c,v 1.79 2005/11/18 23:10:32 bouyer Exp $ */
/*
@@ -1392,7 +1392,7 @@ siop_cmd_put(void *cookie, void *io)
int
siop_scsiprobe(struct scsi_link *link)
{
- struct siop_softc *sc = (struct siop_softc *)link->adapter_softc;
+ struct siop_softc *sc = link->adapter_softc;
struct siop_target *siop_target;
const int target = link->target;
const int lun = link->lun;
@@ -1458,7 +1458,7 @@ void
siop_scsicmd(xs)
struct scsi_xfer *xs;
{
- struct siop_softc *sc = (struct siop_softc *)xs->sc_link->adapter_softc;
+ struct siop_softc *sc = xs->sc_link->adapter_softc;
struct siop_cmd *siop_cmd;
struct siop_target *siop_target;
int s, error, i, j;
diff --git a/sys/dev/ic/trm.c b/sys/dev/ic/trm.c
index 941cdc7274f..f796f168b96 100644
--- a/sys/dev/ic/trm.c
+++ b/sys/dev/ic/trm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: trm.c,v 1.40 2020/07/02 13:29:20 krw Exp $
+/* $OpenBSD: trm.c,v 1.41 2020/07/13 13:43:31 krw Exp $
* ------------------------------------------------------------
* O.S : OpenBSD
* File Name : trm.c
@@ -317,7 +317,7 @@ trm_scsi_cmd(struct scsi_xfer *xs)
target = xs->sc_link->target;
lun = xs->sc_link->lun;
- sc = (struct trm_softc *)xs->sc_link->adapter_softc;
+ sc = xs->sc_link->adapter_softc;
ioh = sc->sc_iohandle;
iot = sc->sc_iotag;
diff --git a/sys/dev/pci/mfii.c b/sys/dev/pci/mfii.c
index 5ff66af170a..0198e77a4d9 100644
--- a/sys/dev/pci/mfii.c
+++ b/sys/dev/pci/mfii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mfii.c,v 1.74 2020/07/11 13:34:06 krw Exp $ */
+/* $OpenBSD: mfii.c,v 1.75 2020/07/13 13:43:31 krw Exp $ */
/*
* Copyright (c) 2012 David Gwynne <dlg@openbsd.org>
@@ -2168,7 +2168,7 @@ mfii_scsi_cmd_done(struct mfii_softc *sc, struct mfii_ccb *ccb)
int
mfii_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag)
{
- struct mfii_softc *sc = (struct mfii_softc *)link->adapter_softc;
+ struct mfii_softc *sc = link->adapter_softc;
DNPRINTF(MFII_D_IOCTL, "%s: mfii_scsi_ioctl\n", DEVNAME(sc));
@@ -2190,7 +2190,7 @@ mfii_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag)
int
mfii_ioctl_cache(struct scsi_link *link, u_long cmd, struct dk_cache *dc)
{
- struct mfii_softc *sc = (struct mfii_softc *)link->adapter_softc;
+ struct mfii_softc *sc = link->adapter_softc;
int rv, wrenable, rdenable;
struct mfi_ld_prop ldp;
union mfi_mbox mbox;
diff --git a/sys/dev/pci/mpii.c b/sys/dev/pci/mpii.c
index 8afcc333ef9..df6c6cd9830 100644
--- a/sys/dev/pci/mpii.c
+++ b/sys/dev/pci/mpii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpii.c,v 1.132 2020/07/11 13:34:06 krw Exp $ */
+/* $OpenBSD: mpii.c,v 1.133 2020/07/13 13:43:31 krw Exp $ */
/*
* Copyright (c) 2010, 2012 Mike Belopuhov
* Copyright (c) 2009 James Giannoules
@@ -3194,7 +3194,7 @@ done:
int
mpii_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag)
{
- struct mpii_softc *sc = (struct mpii_softc *)link->adapter_softc;
+ struct mpii_softc *sc = link->adapter_softc;
struct mpii_device *dev = sc->sc_devs[link->target];
DNPRINTF(MPII_D_IOCTL, "%s: mpii_scsi_ioctl\n", DEVNAME(sc));
@@ -3221,7 +3221,7 @@ mpii_scsi_ioctl(struct scsi_link *link, u_long cmd, caddr_t addr, int flag)
int
mpii_ioctl_cache(struct scsi_link *link, u_long cmd, struct dk_cache *dc)
{
- struct mpii_softc *sc = (struct mpii_softc *)link->adapter_softc;
+ struct mpii_softc *sc = link->adapter_softc;
struct mpii_device *dev = sc->sc_devs[link->target];
struct mpii_cfg_raid_vol_pg0 *vpg;
struct mpii_msg_raid_action_request *req;
diff --git a/sys/dev/sdmmc/sdmmc_scsi.c b/sys/dev/sdmmc/sdmmc_scsi.c
index 2259f7eab29..f8d7572bd0c 100644
--- a/sys/dev/sdmmc/sdmmc_scsi.c
+++ b/sys/dev/sdmmc/sdmmc_scsi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdmmc_scsi.c,v 1.47 2020/07/03 13:31:47 krw Exp $ */
+/* $OpenBSD: sdmmc_scsi.c,v 1.48 2020/07/13 13:43:31 krw Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -598,7 +598,7 @@ sdmmc_scsi_hibernate_io(dev_t dev, daddr_t blkno, vaddr_t addr, size_t size,
sc = NULL;
SLIST_FOREACH(link, &bus_sc->sc_link_list, bus_list) {
if (link->device_softc == disk) {
- sc = (struct sdmmc_softc *)link->adapter_softc;
+ sc = link->adapter_softc;
scsi_sc = sc->sc_scsibus;
sf = scsi_sc->sc_tgt[link->target].card;
}