C99 initializers for scsipi_bustype. No functional change intended.

This commit is contained in:
riastradh 2020-02-19 16:04:39 +00:00
parent 2d463de989
commit 16dde5e683
6 changed files with 70 additions and 66 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ahcisata_core.c,v 1.81 2020/01/18 11:26:11 simonb Exp $ */
/* $NetBSD: ahcisata_core.c,v 1.82 2020/02/19 16:04:39 riastradh Exp $ */
/*
* Copyright (c) 2006 Manuel Bouyer.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.81 2020/01/18 11:26:11 simonb Exp $");
__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.82 2020/02/19 16:04:39 riastradh Exp $");
#include <sys/types.h>
#include <sys/malloc.h>
@ -99,12 +99,12 @@ static void ahci_atapi_kill_xfer(struct ata_channel *, struct ata_xfer *, int);
static void ahci_atapi_probe_device(struct atapibus_softc *, int);
static const struct scsipi_bustype ahci_atapi_bustype = {
SCSIPI_BUSTYPE_ATAPI,
atapi_scsipi_cmd,
atapi_interpret_sense,
atapi_print_addr,
ahci_atapi_kill_pending,
NULL,
.bustype_type = SCSIPI_BUSTYPE_ATAPI,
.bustype_cmd = atapi_scsipi_cmd,
.bustype_interpret_sense = atapi_interpret_sense,
.bustype_printaddr = atapi_print_addr,
.bustype_kill_pending = ahci_atapi_kill_pending,
.bustype_async_event_xfer_mode = NULL,
};
#endif /* NATAPIBUS */

View File

@ -1,4 +1,4 @@
/* $NetBSD: mvsata.c,v 1.52 2019/12/27 09:41:50 msaitoh Exp $ */
/* $NetBSD: mvsata.c,v 1.53 2020/02/19 16:04:39 riastradh Exp $ */
/*
* Copyright (c) 2008 KIYOHARA Takashi
* All rights reserved.
@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.52 2019/12/27 09:41:50 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: mvsata.c,v 1.53 2020/02/19 16:04:39 riastradh Exp $");
#include "opt_mvsata.h"
@ -235,12 +235,12 @@ static const struct ata_bustype mvsata_ata_bustype = {
#if NATAPIBUS > 0
static const struct scsipi_bustype mvsata_atapi_bustype = {
SCSIPI_BUSTYPE_ATAPI,
atapi_scsipi_cmd,
atapi_interpret_sense,
atapi_print_addr,
mvsata_atapi_kill_pending,
NULL,
.bustype_type = SCSIPI_BUSTYPE_ATAPI,
.bustype_cmd = atapi_scsipi_cmd,
.bustype_interpret_sense = atapi_interpret_sense,
.bustype_printaddr = atapi_print_addr,
.bustype_kill_pending = mvsata_atapi_kill_pending,
.bustype_async_event_xfer_mode = NULL,
};
#endif /* NATAPIBUS */
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: siisata.c,v 1.40 2019/11/10 21:16:35 chs Exp $ */
/* $NetBSD: siisata.c,v 1.41 2020/02/19 16:04:39 riastradh Exp $ */
/* from ahcisata_core.c */
@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.40 2019/11/10 21:16:35 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: siisata.c,v 1.41 2020/02/19 16:04:39 riastradh Exp $");
#include <sys/types.h>
#include <sys/param.h>
@ -198,12 +198,12 @@ const struct ata_bustype siisata_ata_bustype = {
#if NATAPIBUS > 0
static const struct scsipi_bustype siisata_atapi_bustype = {
SCSIPI_BUSTYPE_ATAPI,
atapi_scsipi_cmd,
atapi_interpret_sense,
atapi_print_addr,
siisata_atapi_kill_pending,
NULL,
.bustype_type = SCSIPI_BUSTYPE_ATAPI,
.bustype_cmd = atapi_scsipi_cmd,
.bustype_interpret_sense = atapi_interpret_sense,
.bustype_printaddr = atapi_print_addr,
.bustype_kill_pending = siisata_atapi_kill_pending,
.bustype_async_event_xfer_mode = NULL,
};
#endif /* NATAPIBUS */

View File

@ -1,4 +1,4 @@
/* $NetBSD: atapi_wdc.c,v 1.135 2020/02/12 00:19:07 chs Exp $ */
/* $NetBSD: atapi_wdc.c,v 1.136 2020/02/19 16:04:39 riastradh Exp $ */
/*
* Copyright (c) 1998, 2001 Manuel Bouyer.
@ -25,7 +25,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.135 2020/02/12 00:19:07 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: atapi_wdc.c,v 1.136 2020/02/19 16:04:39 riastradh Exp $");
#ifndef ATADEBUG
#define ATADEBUG
@ -101,12 +101,12 @@ static void wdc_atapi_polldsc(void *arg);
#define MAX_SIZE MAXPHYS
static const struct scsipi_bustype wdc_atapi_bustype = {
SCSIPI_BUSTYPE_ATAPI,
atapi_scsipi_cmd,
atapi_interpret_sense,
atapi_print_addr,
wdc_atapi_kill_pending,
NULL,
.bustype_type = SCSIPI_BUSTYPE_ATAPI,
.bustype_cmd = atapi_scsipi_cmd,
.bustype_interpret_sense = atapi_interpret_sense,
.bustype_printaddr = atapi_print_addr,
.bustype_kill_pending = wdc_atapi_kill_pending,
.bustype_async_event_xfer_mode = NULL,
};
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: scsiconf.c,v 1.285 2019/11/10 21:16:37 chs Exp $ */
/* $NetBSD: scsiconf.c,v 1.286 2020/02/19 16:04:39 riastradh Exp $ */
/*-
* Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@ -48,7 +48,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.285 2019/11/10 21:16:37 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.286 2020/02/19 16:04:39 riastradh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -126,39 +126,43 @@ static void scsibus_discover_thread(void *);
static void scsibus_config(struct scsibus_softc *);
const struct scsipi_bustype scsi_bustype = {
SCSIPI_BUSTYPE_BUSTYPE(SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_PSCSI),
scsi_scsipi_cmd,
scsipi_interpret_sense,
scsi_print_addr,
scsi_kill_pending,
scsi_async_event_xfer_mode,
.bustype_type = SCSIPI_BUSTYPE_BUSTYPE(SCSIPI_BUSTYPE_SCSI,
SCSIPI_BUSTYPE_SCSI_PSCSI),
.bustype_cmd = scsi_scsipi_cmd,
.bustype_interpret_sense = scsipi_interpret_sense,
.bustype_printaddr = scsi_print_addr,
.bustype_kill_pending = scsi_kill_pending,
.bustype_async_event_xfer_mode = scsi_async_event_xfer_mode,
};
const struct scsipi_bustype scsi_fc_bustype = {
SCSIPI_BUSTYPE_BUSTYPE(SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_FC),
scsi_scsipi_cmd,
scsipi_interpret_sense,
scsi_print_addr,
scsi_kill_pending,
scsi_fc_sas_async_event_xfer_mode,
.bustype_type = SCSIPI_BUSTYPE_BUSTYPE(SCSIPI_BUSTYPE_SCSI,
SCSIPI_BUSTYPE_SCSI_FC),
.bustype_cmd = scsi_scsipi_cmd,
.bustype_interpret_sense = scsipi_interpret_sense,
.bustype_printaddr = scsi_print_addr,
.bustype_kill_pending = scsi_kill_pending,
.bustype_async_event_xfer_mode = scsi_fc_sas_async_event_xfer_mode,
};
const struct scsipi_bustype scsi_sas_bustype = {
SCSIPI_BUSTYPE_BUSTYPE(SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_SAS),
scsi_scsipi_cmd,
scsipi_interpret_sense,
scsi_print_addr,
scsi_kill_pending,
scsi_fc_sas_async_event_xfer_mode,
.bustype_type = SCSIPI_BUSTYPE_BUSTYPE(SCSIPI_BUSTYPE_SCSI,
SCSIPI_BUSTYPE_SCSI_SAS),
.bustype_cmd = scsi_scsipi_cmd,
.bustype_interpret_sense = scsipi_interpret_sense,
.bustype_printaddr = scsi_print_addr,
.bustype_kill_pending = scsi_kill_pending,
.bustype_async_event_xfer_mode = scsi_fc_sas_async_event_xfer_mode,
};
const struct scsipi_bustype scsi_usb_bustype = {
SCSIPI_BUSTYPE_BUSTYPE(SCSIPI_BUSTYPE_SCSI, SCSIPI_BUSTYPE_SCSI_USB),
scsi_scsipi_cmd,
scsipi_interpret_sense,
scsi_print_addr,
scsi_kill_pending,
NULL,
.bustype_type = SCSIPI_BUSTYPE_BUSTYPE(SCSIPI_BUSTYPE_SCSI,
SCSIPI_BUSTYPE_SCSI_USB),
.bustype_cmd = scsi_scsipi_cmd,
.bustype_interpret_sense = scsipi_interpret_sense,
.bustype_printaddr = scsi_print_addr,
.bustype_kill_pending = scsi_kill_pending,
.bustype_async_event_xfer_mode = NULL,
};
static int

View File

@ -1,4 +1,4 @@
/* $NetBSD: umass_scsipi.c,v 1.63 2019/11/10 21:16:38 chs Exp $ */
/* $NetBSD: umass_scsipi.c,v 1.64 2020/02/19 16:04:40 riastradh Exp $ */
/*
* Copyright (c) 2001, 2003, 2012 The NetBSD Foundation, Inc.
@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.63 2019/11/10 21:16:38 chs Exp $");
__KERNEL_RCSID(0, "$NetBSD: umass_scsipi.c,v 1.64 2020/02/19 16:04:40 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -112,12 +112,12 @@ Static struct umass_scsipi_softc *umass_scsipi_setup(struct umass_softc *);
Static void umass_atapi_probe_device(struct atapibus_softc *, int);
const struct scsipi_bustype umass_atapi_bustype = {
SCSIPI_BUSTYPE_ATAPI,
atapi_scsipi_cmd,
atapi_interpret_sense,
atapi_print_addr,
scsi_kill_pending,
NULL,
.bustype_type = SCSIPI_BUSTYPE_ATAPI,
.bustype_cmd = atapi_scsipi_cmd,
.bustype_interpret_sense = atapi_interpret_sense,
.bustype_printaddr = atapi_print_addr,
.bustype_kill_pending = scsi_kill_pending,
.bustype_async_event_xfer_mode = NULL,
};
#endif