git: 6350ace614fc - stable/13 - Drop d_dump from struct cdevsw

From: Mitchell Horne <mhorne_at_FreeBSD.org>
Date: Fri, 27 May 2022 16:23:29 UTC
The branch stable/13 has been updated by mhorne:

URL: https://cgit.FreeBSD.org/src/commit/?id=6350ace614fc329b786f063e6633c191b8dedadb

commit 6350ace614fc329b786f063e6633c191b8dedadb
Author:     Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2022-05-13 13:38:54 +0000
Commit:     Mitchell Horne <mhorne@FreeBSD.org>
CommitDate: 2022-05-27 16:22:22 +0000

    Drop d_dump from struct cdevsw
    
    It appears to be unused. These days struct disk has a d_dump member,
    which is what gets passed to the kernel dump framework.
    
    Reviewed by:    markj
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D35172
    
    (cherry picked from commit 0f50da2e09b7dddad25953d0c167efe09f7282eb)
---
 sys/kern/kern_conf.c | 7 -------
 sys/sys/conf.h       | 8 ++++----
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c
index f6724095c762..1cd5bc2635c1 100644
--- a/sys/kern/kern_conf.c
+++ b/sys/kern/kern_conf.c
@@ -301,7 +301,6 @@ dead_strategy(struct bio *bp)
 	biofinish(bp, NULL, ENXIO);
 }
 
-#define dead_dump	(dumper_t *)enxio
 #define dead_kqfilter	(d_kqfilter_t *)enxio
 #define dead_mmap_single (d_mmap_single_t *)enodev
 
@@ -316,7 +315,6 @@ static struct cdevsw dead_cdevsw = {
 	.d_mmap =	dead_mmap,
 	.d_strategy =	dead_strategy,
 	.d_name =	"dead",
-	.d_dump =	dead_dump,
 	.d_kqfilter =	dead_kqfilter,
 	.d_mmap_single = dead_mmap_single
 };
@@ -346,8 +344,6 @@ no_poll(struct cdev *dev __unused, int events, struct thread *td __unused)
 	return (poll_no_poll(events));
 }
 
-#define no_dump		(dumper_t *)enodev
-
 static int
 giant_open(struct cdev *dev, int oflags, int devtype, struct thread *td)
 {
@@ -662,7 +658,6 @@ prep_cdevsw(struct cdevsw *devsw, int flags)
 		devsw->d_mmap = dead_mmap;
 		devsw->d_mmap_single = dead_mmap_single;
 		devsw->d_strategy = dead_strategy;
-		devsw->d_dump = dead_dump;
 		devsw->d_kqfilter = dead_kqfilter;
 	}
 
@@ -701,8 +696,6 @@ prep_cdevsw(struct cdevsw *devsw, int flags)
 	FIXUP(d_kqfilter,	no_kqfilter,	giant_kqfilter);
 	FIXUP(d_mmap_single,	no_mmap_single,	giant_mmap_single);
 
-	if (devsw->d_dump == NULL)	devsw->d_dump = no_dump;
-
 	LIST_INIT(&devsw->d_devs);
 
 	devsw->d_flags |= D_INIT;
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index 7c9c59e3fcdf..cd0c6e89635b 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -210,17 +210,17 @@ struct cdevsw {
 	d_poll_t		*d_poll;
 	d_mmap_t		*d_mmap;
 	d_strategy_t		*d_strategy;
-	dumper_t		*d_dump;
+	void			*d_spare0;
 	d_kqfilter_t		*d_kqfilter;
 	d_purge_t		*d_purge;
 	d_mmap_single_t		*d_mmap_single;
 
-	int32_t			d_spare0[3];
-	void			*d_spare1[3];
+	int32_t			d_spare1[3];
+	void			*d_spare2[3];
 
 	/* These fields should not be messed with by drivers */
 	LIST_HEAD(, cdev)	d_devs;
-	int			d_spare2;
+	int			d_spare3;
 	union {
 		struct cdevsw		*gianttrick;
 		SLIST_ENTRY(cdevsw)	postfree_list;