From nobody Wed Jul 27 15:06:21 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4LtHDF4ZKkz4XmvX; Wed, 27 Jul 2022 15:06:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4LtHDF43D4z3mgF; Wed, 27 Jul 2022 15:06:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658934381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6nUB+btIxaqb+jWjl6SwvcXVXZq7lwn02x6FzBaK/Cs=; b=EwzxHZdykOsEBs/iI7D84mLRwR1q06uVpKhb8GysLjq6sCXU34hLLCLcign29Npk61iWsU kbQ4MwqTNaZIrNcGbz6Y+pScZwmn7F8crsjk9+DcINtt/4FohrJJ0oWya6VjTIlozPHgjk QWKwtHWS74pMyLqOsraBv/cbYBtCDoiCNCQNio8845c6o3ybm4c0IrwBQFlww7adoMHDNS QIIQwE1WT2FPT5pPrXelczTlYWuSjdRC1Z0mcWoh9pKzQz70C3tUJnqD2FX61R42FmKGEO 1BXzUP8ed88Jqfi8lqOH7KMYJrAYmdcT779Rsulttg3pJsms/0/nu0nLb89fsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4LtHDF38xdzLY1; Wed, 27 Jul 2022 15:06:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26RF6LrM019437; Wed, 27 Jul 2022 15:06:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26RF6LvD019436; Wed, 27 Jul 2022 15:06:21 GMT (envelope-from git) Date: Wed, 27 Jul 2022 15:06:21 GMT Message-Id: <202207271506.26RF6LvD019436@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: e98f952c8290 - main - stand: Make sure nobody has a NULL pointer for dv_cleanup List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e98f952c82907ec39cebb4e66efd92691c835e05 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658934381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6nUB+btIxaqb+jWjl6SwvcXVXZq7lwn02x6FzBaK/Cs=; b=H8TfGUXzyFVwgRH3UVH5YHDKo1Uv/o1wL22pJ6xKEv2IgTrEKqY/VGgvR/28bWPv8av/GU aqd1IzPhPw4BVXV+byreqZD30l5qoXFf1BBfCQCLuZbgzGUzB21ycVjnZLVrD3tvbiAla5 hlH0MFOa0fvCZ+gFSs/9f/Ph+tJCatA9WTPRYfW/BKgacURJW8zccaQDbW31ABODPRAIuJ mDDqKwe2gO6TYJWWCa1jwp6oXOakE5yG6CwqpwahFgQvU6snHfwZga4LKIa8tVAgg5vl9z /QhcKwkJqi/127UF0rTohTzT27L8bEQe3LynFI01tj3fLHvR4UDImXtqDyLqHA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658934381; a=rsa-sha256; cv=none; b=ee04Tz67rOHrsrzz45OdjVzd5ZqLB1Ea+0/2G4br7q+TL0b4YkiSdWuVOGPf0nxFEwekc/ dxXOWQ2gkaOeT9DVh/3lXp6oBnA3rIHYb591Dz5LS82+Str4pCIfQGyuRI55E5boEfiUt+ fF/lA+w0dXWNM0VaXIophGR9UM6zYgoo2YucxpwWXXcPKRxdxYpRynOxxB4owY5fopC6Oo EC5tOMnaCXOR0PRTWqrA9icHSUZuX7AtM8Ll2+Ke1L+ChzY84azwJ0n34LUjVlRvyN31AJ eB3qplAGHrdWMyAzqwM/tfJ/gqnM7W6wqK1JUPH4au8LJ5+IQQUm7FBBPXcwXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e98f952c82907ec39cebb4e66efd92691c835e05 commit e98f952c82907ec39cebb4e66efd92691c835e05 Author: Warner Losh AuthorDate: 2022-07-27 14:46:21 +0000 Commit: Warner Losh CommitDate: 2022-07-27 15:04:13 +0000 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 --- stand/common/md.c | 1 + stand/common/vdisk.c | 2 +- stand/efi/libefi/efihttp.c | 2 +- stand/efi/libefi/efinet.c | 2 +- stand/efi/libefi/efipart.c | 6 +++--- stand/i386/libi386/biosdisk.c | 6 +++--- stand/i386/libi386/pxe.c | 2 +- stand/kboot/hostdisk.c | 1 + stand/libofw/ofw_disk.c | 1 + stand/libsa/zfs/zfs.c | 2 +- stand/userboot/userboot/host.c | 2 +- 11 files changed, 15 insertions(+), 12 deletions(-) diff --git a/stand/common/md.c b/stand/common/md.c index e9fcac668d93..61db56ece7ae 100644 --- a/stand/common/md.c +++ b/stand/common/md.c @@ -74,6 +74,7 @@ struct devsw md_dev = { .dv_close = md_close, .dv_ioctl = noioctl, .dv_print = md_print, + .dv_cleanup = nullsys, }; static int diff --git a/stand/common/vdisk.c b/stand/common/vdisk.c index 521ad498b194..c904613a8e91 100644 --- a/stand/common/vdisk.c +++ b/stand/common/vdisk.c @@ -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; diff --git a/stand/efi/libefi/efihttp.c b/stand/efi/libefi/efihttp.c index 05d338fbaf04..728f95a47b42 100644 --- a/stand/efi/libefi/efihttp.c +++ b/stand/efi/libefi/efihttp.c @@ -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 = { diff --git a/stand/efi/libefi/efinet.c b/stand/efi/libefi/efinet.c index c52b11d32ec8..a6582bd2c1b5 100644 --- a/stand/efi/libefi/efinet.c +++ b/stand/efi/libefi/efinet.c @@ -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 diff --git a/stand/efi/libefi/efipart.c b/stand/efi/libefi/efipart.c index 7807c17077a6..e5c9c88234b7 100644 --- a/stand/efi/libefi/efipart.c +++ b/stand/efi/libefi/efipart.c @@ -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); diff --git a/stand/i386/libi386/biosdisk.c b/stand/i386/libi386/biosdisk.c index 2c52617f255d..4f07343344fd 100644 --- a/stand/i386/libi386/biosdisk.c +++ b/stand/i386/libi386/biosdisk.c @@ -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 * diff --git a/stand/i386/libi386/pxe.c b/stand/i386/libi386/pxe.c index e80a1961e191..3c6c5468fe37 100644 --- a/stand/i386/libi386/pxe.c +++ b/stand/i386/libi386/pxe.c @@ -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, }; /* diff --git a/stand/kboot/hostdisk.c b/stand/kboot/hostdisk.c index 25348c60fc97..cd125350ce9b 100644 --- a/stand/kboot/hostdisk.c +++ b/stand/kboot/hostdisk.c @@ -48,6 +48,7 @@ struct devsw hostdisk = { .dv_close = hostdisk_close, .dv_ioctl = hostdisk_ioctl, .dv_print = hostdisk_print, + .dv_cleanup = nullsys, }; static int diff --git a/stand/libofw/ofw_disk.c b/stand/libofw/ofw_disk.c index 8af5750b13bc..086b16a9ecdc 100644 --- a/stand/libofw/ofw_disk.c +++ b/stand/libofw/ofw_disk.c @@ -59,6 +59,7 @@ struct devsw ofwdisk = { .dv_close = ofwd_close, .dv_ioctl = ofwd_ioctl, .dv_print = ofwd_print, + .dv_cleanup = nullsys, }; /* diff --git a/stand/libsa/zfs/zfs.c b/stand/libsa/zfs/zfs.c index 633ef3b18784..71e3a49c2929 100644 --- a/stand/libsa/zfs/zfs.c +++ b/stand/libsa/zfs/zfs.c @@ -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 diff --git a/stand/userboot/userboot/host.c b/stand/userboot/userboot/host.c index 74727fd8ce3b..d7f01f45c0ab 100644 --- a/stand/userboot/userboot/host.c +++ b/stand/userboot/userboot/host.c @@ -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, };