From nobody Tue Jan 24 22:11:30 2023 X-Original-To: dev-commits-src-branches@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 4P1h5G395Fz3bfQP; Tue, 24 Jan 2023 22:11:30 +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 4P1h5G1zrzz4Nf3; Tue, 24 Jan 2023 22:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598290; 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=4JoX7hVgV+38e26GRnT/WKu5UfLIB4Ib5Ijp6wY0JXM=; b=Fuoy8ZysDHcwqntcWTGk+oeRm9NP5IUvXJPwbnXNxHae3UXuNAjzg2v6g8pRn692iqD3+G Lw4+ByflXn40f7WxqxT8cBDL6tHqEgFKQUwgUKibRMWBbo2SPY4sPfMpadlUCGj8/EA6op 2Z9OudDa5I/aPw+c5D271LT7TE/C7XcHiJyv2YG9peZ8gfbuKA4j7f/xz9VnFMpIlYQTJ9 xP9XGTbRZ8GZIO2YmexQ2Bv96/bckCNNxZ/vvi28GGhzutH6TMGHHflki5P0ra8RWVsQ6n /VZWGodkKcVBgogbkYHJEkoJUehT5zVvF1L9pFunRIlAul2rqIDQv/d06F/JHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1674598290; 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=4JoX7hVgV+38e26GRnT/WKu5UfLIB4Ib5Ijp6wY0JXM=; b=L9JH9TerzQ0sWIx1n4UOD8dQnY/luLLhJxXtwPmy4B/qmrNbv6ush6G6ZO9uGF/3OTrGaD eVu9s5qJ3i8BecQ0dBB389GJDrPe9s9XsHznLO5ItCyZQJs+neIzSe/8xGbmIeg5Iea7Tu xxgGv+o3RfQAwhGFiaNYAHCXxq6N+LkXx9ZkISYJK1G1JHEp3Uh2kYLjnOPdlP732VZXuG 93Qy66Y2K9pomezLhiqg7jMtz87DoEhx2XXoI6HnwGPPRcIy2KdqrEtQoINTOYGkuBK/iy WN/qagwmjJ7nYqDySthN0rA0fTO759OsgJhmX57ecD0ZoQc08dP+5eWMrN6BHg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1674598290; a=rsa-sha256; cv=none; b=i1IelOJmbU5+VYNIrat4PFT/CC1lOHus9wkN73pN/jtEvVqy8JbMimKEnUFN5xzcfm3xz6 MruOohlgpdvGTKNXzy8tkJWkMKdXqDTTQtwKl8Hi0VGHQLBfTwkmJKbPZOPuauqyzgH5eK wfeFfWwQ7Ucwb0xkOeixha9dCzT6x8zU4eCieaCp7Q8/MWV7epRsdv7nNRz6gQ74r8/BO9 URG0cD4F383VN3pgPK2w3PaV+PCVo1YqFaK94aVCyqfuVrK+eXVeGZikIU4MaKP6Rrthzc GxR8h/T3hkvPUeM/r3hHeu+n6t4Jy4hrmcKCPdk9y+wC3Lj0SbpzE+5PE7KOIg== 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 4P1h5G12WMzQTq; Tue, 24 Jan 2023 22:11:30 +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 30OMBUm5084812; Tue, 24 Jan 2023 22:11:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 30OMBUJM084811; Tue, 24 Jan 2023 22:11:30 GMT (envelope-from git) Date: Tue, 24 Jan 2023 22:11:30 GMT Message-Id: <202301242211.30OMBUJM084811@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 538888eec5d7 - stable/13 - stand: Make sure nobody has a NULL pointer for dv_cleanup List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@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/stable/13 X-Git-Reftype: branch X-Git-Commit: 538888eec5d7065c1b371e79f1f228fac64a87f0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=538888eec5d7065c1b371e79f1f228fac64a87f0 commit 538888eec5d7065c1b371e79f1f228fac64a87f0 Author: Warner Losh AuthorDate: 2022-07-27 14:46:21 +0000 Commit: Warner Losh CommitDate: 2023-01-24 21:49:27 +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 (cherry picked from commit e98f952c82907ec39cebb4e66efd92691c835e05) --- 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 f8c712b324c6..353b25ff6816 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, };