stand: Make sure nobody has a NULL pointer for dv_cleanup

dv_cleanup is specified almost everywhere. Use nullsys instead of NULL
to indicate 'do nothing'. Also, be consistent in trailing commas that
were missing before.

Sponsored by:		Netflix
Reviewed by:		tsoome
Differential Revision:	https://reviews.freebsd.org/D35913
This commit is contained in:
Warner Losh 2022-07-27 08:46:21 -06:00
parent 079f02e8c0
commit e98f952c82
11 changed files with 15 additions and 12 deletions

View File

@ -74,6 +74,7 @@ struct devsw md_dev = {
.dv_close = md_close,
.dv_ioctl = noioctl,
.dv_print = md_print,
.dv_cleanup = nullsys,
};
static int

View File

@ -52,7 +52,7 @@ struct devsw vdisk_dev = {
.dv_close = vdisk_close,
.dv_ioctl = vdisk_ioctl,
.dv_print = vdisk_print,
.dv_cleanup = NULL
.dv_cleanup = nullsys,
};
typedef STAILQ_HEAD(vdisk_info_list, vdisk_info) vdisk_info_list_t;

View File

@ -94,7 +94,7 @@ struct devsw efihttp_dev = {
.dv_close = efihttp_dev_close,
.dv_ioctl = noioctl,
.dv_print = NULL,
.dv_cleanup = NULL,
.dv_cleanup = nullsys,
};
struct fs_ops efihttp_fsops = {

View File

@ -351,7 +351,7 @@ struct devsw efinet_dev = {
.dv_close = NULL, /* Will be set in efinet_dev_init */
.dv_ioctl = noioctl,
.dv_print = efinet_dev_print,
.dv_cleanup = NULL
.dv_cleanup = nullsys,
};
static int

View File

@ -78,7 +78,7 @@ struct devsw efipart_fddev = {
.dv_close = efipart_close,
.dv_ioctl = efipart_ioctl,
.dv_print = efipart_printfd,
.dv_cleanup = NULL
.dv_cleanup = nullsys,
};
struct devsw efipart_cddev = {
@ -90,7 +90,7 @@ struct devsw efipart_cddev = {
.dv_close = efipart_close,
.dv_ioctl = efipart_ioctl,
.dv_print = efipart_printcd,
.dv_cleanup = NULL
.dv_cleanup = nullsys,
};
struct devsw efipart_hddev = {
@ -102,7 +102,7 @@ struct devsw efipart_hddev = {
.dv_close = efipart_close,
.dv_ioctl = efipart_ioctl,
.dv_print = efipart_printhd,
.dv_cleanup = NULL
.dv_cleanup = nullsys,
};
static pdinfo_list_t fdinfo = STAILQ_HEAD_INITIALIZER(fdinfo);

View File

@ -165,7 +165,7 @@ struct devsw biosfd = {
.dv_close = bd_close,
.dv_ioctl = bd_ioctl,
.dv_print = fd_print,
.dv_cleanup = NULL
.dv_cleanup = nullsys,
};
struct devsw bioscd = {
@ -177,7 +177,7 @@ struct devsw bioscd = {
.dv_close = bd_close,
.dv_ioctl = bd_ioctl,
.dv_print = cd_print,
.dv_cleanup = NULL
.dv_cleanup = nullsys,
};
struct devsw bioshd = {
@ -189,7 +189,7 @@ struct devsw bioshd = {
.dv_close = bd_close,
.dv_ioctl = bd_ioctl,
.dv_print = bd_print,
.dv_cleanup = NULL
.dv_cleanup = nullsys,
};
static bdinfo_list_t *

View File

@ -119,7 +119,7 @@ struct devsw pxedisk = {
.dv_close = NULL, /* Will be set in pxe_init */
.dv_ioctl = noioctl,
.dv_print = pxe_print,
.dv_cleanup = pxe_cleanup
.dv_cleanup = pxe_cleanup,
};
/*

View File

@ -48,6 +48,7 @@ struct devsw hostdisk = {
.dv_close = hostdisk_close,
.dv_ioctl = hostdisk_ioctl,
.dv_print = hostdisk_print,
.dv_cleanup = nullsys,
};
static int

View File

@ -59,6 +59,7 @@ struct devsw ofwdisk = {
.dv_close = ofwd_close,
.dv_ioctl = ofwd_ioctl,
.dv_print = ofwd_print,
.dv_cleanup = nullsys,
};
/*

View File

@ -1633,7 +1633,7 @@ struct devsw zfs_dev = {
.dv_close = zfs_dev_close,
.dv_ioctl = noioctl,
.dv_print = zfs_dev_print,
.dv_cleanup = NULL
.dv_cleanup = nullsys,
};
int

View File

@ -174,5 +174,5 @@ struct devsw host_dev = {
.dv_close = host_dev_close,
.dv_ioctl = noioctl,
.dv_print = host_dev_print,
.dv_cleanup = NULL
.dv_cleanup = nullsys,
};