From 0dcae15371ebd5dc7a19d358d01ad6283c2b40c4 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Wed, 26 Sep 2018 19:05:30 +0200 Subject: [PATCH] kernel/vinum: Fix -Wundef. --- sys/dev/raid/vinum/request.h | 2 +- sys/dev/raid/vinum/vinuminterrupt.c | 4 ++-- sys/dev/raid/vinum/vinumio.c | 2 +- sys/dev/raid/vinum/vinumlock.c | 2 +- sys/dev/raid/vinum/vinummemory.c | 2 +- sys/dev/raid/vinum/vinumrequest.c | 14 +++++++------- sys/dev/raid/vinum/vinumrevive.c | 2 +- sys/dev/raid/vinum/vinumvar.h | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sys/dev/raid/vinum/request.h b/sys/dev/raid/vinum/request.h index 4e6e352df2..d3edd700f4 100644 --- a/sys/dev/raid/vinum/request.h +++ b/sys/dev/raid/vinum/request.h @@ -47,7 +47,7 @@ enum xferinfo { XFR_PARITY_BLOCK = 0x80, /* parity block in request */ XFR_BAD_SUBDISK = 0x100, /* this subdisk is dead */ XFR_MALLOCED = 0x200, /* this buffer is malloced */ -#if VINUMDEBUG +#ifdef VINUMDEBUG XFR_PHASE2 = 0x800, /* debug only: 2nd phase write */ #endif XFR_REVIVECONFLICT = 0x1000, /* possible conflict with a revive */ diff --git a/sys/dev/raid/vinum/vinuminterrupt.c b/sys/dev/raid/vinum/vinuminterrupt.c index 1303f23f64..11063dd1c4 100644 --- a/sys/dev/raid/vinum/vinuminterrupt.c +++ b/sys/dev/raid/vinum/vinuminterrupt.c @@ -411,7 +411,7 @@ complete_raid5_write(struct rqelement *rqe) vinum_conf.active++; if (vinum_conf.active >= vinum_conf.maxactive) vinum_conf.maxactive = vinum_conf.active; -#if VINUMDEBUG +#ifdef VINUMDEBUG if (debug & DEBUG_ADDRESSES) log(LOG_DEBUG, " %s dev %s, sd %d, offset 0x%jx, devoffset 0x%jx, length %d\n", @@ -448,7 +448,7 @@ complete_raid5_write(struct rqelement *rqe) if (vinum_conf.active >= vinum_conf.maxactive) vinum_conf.maxactive = vinum_conf.active; -#if VINUMDEBUG +#ifdef VINUMDEBUG if (debug & DEBUG_ADDRESSES) log(LOG_DEBUG, " %s dev %s, sd %d, offset 0x%jx, devoffset 0x%jx, length %d\n", diff --git a/sys/dev/raid/vinum/vinumio.c b/sys/dev/raid/vinum/vinumio.c index ac596b906a..e2cab20149 100644 --- a/sys/dev/raid/vinum/vinumio.c +++ b/sys/dev/raid/vinum/vinumio.c @@ -123,7 +123,7 @@ set_drive_parms(struct drive *drive) bcopy(hostname, drive->label.sysname, VINUMHOSTNAMELEN); /* put in host name */ getmicrotime(&drive->label.date_of_birth); /* and current time */ drive->label.drive_size = drive->partinfo.media_size; -#if VINUMDEBUG +#ifdef VINUMDEBUG if (debug & DEBUG_BIGDRIVE) /* pretend we're 100 times as big */ drive->label.drive_size *= 100; #endif diff --git a/sys/dev/raid/vinum/vinumlock.c b/sys/dev/raid/vinum/vinumlock.c index 787ca80ed6..07253ba2f1 100644 --- a/sys/dev/raid/vinum/vinumlock.c +++ b/sys/dev/raid/vinum/vinumlock.c @@ -45,7 +45,7 @@ #include "request.h" /* Lock a drive, wait if it's in use */ -#if VINUMDEBUG +#ifdef VINUMDEBUG int lockdrive(struct drive *drive, char *file, int line) #else diff --git a/sys/dev/raid/vinum/vinummemory.c b/sys/dev/raid/vinum/vinummemory.c index 3444415bff..d602b1cb34 100644 --- a/sys/dev/raid/vinum/vinummemory.c +++ b/sys/dev/raid/vinum/vinummemory.c @@ -80,7 +80,7 @@ expand_table(void **table, int oldsize, int newsize) } } -#if VINUMDEBUG /* XXX debug */ +#ifdef VINUMDEBUG /* XXX debug */ #define MALLOCENTRIES 16384 int malloccount = 0; int highwater = 0; /* highest index ever allocated */ diff --git a/sys/dev/raid/vinum/vinumrequest.c b/sys/dev/raid/vinum/vinumrequest.c index f4eec5fd4b..e72f220f91 100644 --- a/sys/dev/raid/vinum/vinumrequest.c +++ b/sys/dev/raid/vinum/vinumrequest.c @@ -198,7 +198,7 @@ vinumstart(cdev_t dev, struct bio *bio, int reviveok) bio->bio_driver_info = dev; -#if VINUMDEBUG +#ifdef VINUMDEBUG if (debug & DEBUG_LASTREQS) logrq(loginfo_user_bp, (union rqinfou) bio, bio); #endif @@ -338,7 +338,7 @@ launch_requests(struct request *rq, int reviveok) } else sd->waitlist = rq; /* hook our request at the front */ -#if VINUMDEBUG +#ifdef VINUMDEBUG if (debug & DEBUG_REVIVECONFLICT) { log(LOG_DEBUG, "Revive conflict sd %d: %p\n%s dev %d.%d, offset 0x%jx, length %d\n", @@ -354,7 +354,7 @@ launch_requests(struct request *rq, int reviveok) return 0; /* and get out of here */ } rq->active = 0; /* nothing yet */ -#if VINUMDEBUG +#ifdef VINUMDEBUG if (debug & DEBUG_ADDRESSES) log(LOG_DEBUG, "Request: %p\n%s dev %d.%d, offset 0x%jx, length %d\n", @@ -624,7 +624,7 @@ bre(struct request *rq, */ if (rqe->sdoffset + rqe->datalen > sd->sectors) { /* ends beyond the end of the subdisk? */ rqe->datalen = sd->sectors - rqe->sdoffset; /* truncate */ -#if VINUMDEBUG +#ifdef VINUMDEBUG if (debug & DEBUG_EOFINFO) { /* tell on the request */ log(LOG_DEBUG, "vinum: EOF on plex %s, sd %s offset %jx (user offset %jx)\n", @@ -898,7 +898,7 @@ sdio(struct bio *bio) dev = bio->bio_driver_info; -#if VINUMDEBUG +#ifdef VINUMDEBUG if (debug & DEBUG_LASTREQS) logrq(loginfo_sdio, (union rqinfou) bio, bio); #endif @@ -961,7 +961,7 @@ sdio(struct bio *bio) return; } } -#if VINUMDEBUG +#ifdef VINUMDEBUG if (debug & DEBUG_ADDRESSES) log(LOG_DEBUG, " %s dev %s, sd %d, offset 0x%jx, devoffset 0x%jx, length %d\n", @@ -973,7 +973,7 @@ sdio(struct bio *bio) sbp->b.b_bcount); #endif crit_enter(); -#if VINUMDEBUG +#ifdef VINUMDEBUG if (debug & DEBUG_LASTREQS) logrq(loginfo_sdiol, (union rqinfou) &sbp->b.b_bio1, &sbp->b.b_bio1); #endif diff --git a/sys/dev/raid/vinum/vinumrevive.c b/sys/dev/raid/vinum/vinumrevive.c index 65f285b623..c33f98d481 100644 --- a/sys/dev/raid/vinum/vinumrevive.c +++ b/sys/dev/raid/vinum/vinumrevive.c @@ -196,7 +196,7 @@ revive_block(int sdno) if (lock) /* we took a lock, */ unlockrange(sd->plexno, lock); /* give it back */ while (sd->waitlist) { /* we have waiting requests */ -#if VINUMDEBUG +#ifdef VINUMDEBUG struct request *rq = sd->waitlist; cdev_t dev; diff --git a/sys/dev/raid/vinum/vinumvar.h b/sys/dev/raid/vinum/vinumvar.h index fee8f62fca..341d2b57ad 100644 --- a/sys/dev/raid/vinum/vinumvar.h +++ b/sys/dev/raid/vinum/vinumvar.h @@ -250,7 +250,7 @@ struct devcode { * These definitions help catch * userland/kernel mismatches. */ -#if VINUMDEBUG +#ifdef VINUMDEBUG /* normal super device */ #define VINUM_WRONGSUPERDEV_NAME VINUM_DIR "/control" @@ -337,7 +337,7 @@ struct _vinum_conf { #define VINUM_MAXACTIVE 30000 /* max number of active requests */ int active; /* current number of requests outstanding */ int maxactive; /* max number of requests ever outstanding */ -#if VINUMDEBUG +#ifdef VINUMDEBUG struct request *lastrq; struct bio *lastbio; #endif -- 2.11.4.GIT