aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Horne <mhorne@FreeBSD.org>2022-05-13 13:38:54 +0000
committerMitchell Horne <mhorne@FreeBSD.org>2022-05-13 13:42:17 +0000
commit0f50da2e09b7dddad25953d0c167efe09f7282eb (patch)
tree4d7c2216d5bb44c954e4810290bebcf7d4db904f
parent51adf913e8815bdc928cb72dd378c596b8b15336 (diff)
downloadsrc-0f50da2e09b7dddad25953d0c167efe09f7282eb.tar.gz
src-0f50da2e09b7dddad25953d0c167efe09f7282eb.zip
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
-rw-r--r--sys/kern/kern_conf.c7
-rw-r--r--sys/sys/conf.h8
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 4808de511d6b..02671a065c09 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -209,17 +209,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;