diff options
author | Mateusz Guzik <mjg@FreeBSD.org> | 2020-09-01 22:14:09 +0000 |
---|---|---|
committer | Mateusz Guzik <mjg@FreeBSD.org> | 2020-09-01 22:14:09 +0000 |
commit | d40bc607528a613afeb59bdaabd09ad4d33c67be (patch) | |
tree | e0846c5c8a6f83f70fbb93deeded40a7106308f1 | |
parent | 27dcd3d90b41d3c89eac3c2b50b9a6f515e5c89d (diff) |
Notes
60 files changed, 32 insertions, 141 deletions
diff --git a/sys/geom/bde/g_bde.c b/sys/geom/bde/g_bde.c index f7dd4188c766..b516f300b3a2 100644 --- a/sys/geom/bde/g_bde.c +++ b/sys/geom/bde/g_bde.c @@ -129,7 +129,6 @@ g_bde_create_geom(struct gctl_req *req, struct g_class *mp, struct g_provider *p g_topology_assert(); gp = NULL; - gp = g_new_geomf(mp, "%s.bde", pp->name); cp = g_new_consumer(gp); g_attach(cp, pp); @@ -226,7 +225,6 @@ g_bde_create_geom(struct gctl_req *req, struct g_class *mp, struct g_provider *p return; } - static int g_bde_destroy_geom(struct gctl_req *req, struct g_class *mp, struct g_geom *gp) { diff --git a/sys/geom/bde/g_bde.h b/sys/geom/bde/g_bde.h index 1b54057198fc..3f36bb4281ae 100644 --- a/sys/geom/bde/g_bde.h +++ b/sys/geom/bde/g_bde.h @@ -54,7 +54,6 @@ #define G_BDE_LOCKSIZE 384 #define NLOCK_FIELDS 13 - /* This just needs to be "large enough" */ #define G_BDE_KEYBYTES 304 diff --git a/sys/geom/bde/g_bde_crypt.c b/sys/geom/bde/g_bde_crypt.c index 61015f480c7f..1312140186ff 100644 --- a/sys/geom/bde/g_bde_crypt.c +++ b/sys/geom/bde/g_bde_crypt.c @@ -124,7 +124,6 @@ g_bde_crypt_read(struct g_bde_work *wp) u_char skey[G_BDE_SKEYLEN]; keyInstance ki; cipherInstance ci; - AES_init(&ci); sc = wp->softc; @@ -164,7 +163,6 @@ g_bde_crypt_write(struct g_bde_work *wp) AES_init(&ci); o = 0; for (n = 0; o < wp->length; n++, o += sc->sectorsize) { - s = (u_char *)wp->data + o; d = (u_char *)wp->sp->data + o; arc4rand(skey, sizeof skey, 0); diff --git a/sys/geom/cache/g_cache.c b/sys/geom/cache/g_cache.c index 337879a3f52c..4e6c95cbd4ee 100644 --- a/sys/geom/cache/g_cache.c +++ b/sys/geom/cache/g_cache.c @@ -93,7 +93,6 @@ SYSCTL_PROC(_kern_geom_cache, OID_AUTO, used_hi, sysctl_handle_pct, "IU", ""); - static int g_cache_destroy(struct g_cache_softc *sc, boolean_t force); static g_ctl_destroy_geom_t g_cache_destroy_geom; @@ -112,7 +111,6 @@ struct g_class g_cache_class = { #define OFF2BNO(off, sc) ((off) >> (sc)->sc_bshift) #define BNO2OFF(bno, sc) ((bno) << (sc)->sc_bshift) - static struct g_cache_desc * g_cache_alloc(struct g_cache_softc *sc) { diff --git a/sys/geom/concat/g_concat.c b/sys/geom/concat/g_concat.c index adb92567aba5..458d8dcd4ee7 100644 --- a/sys/geom/concat/g_concat.c +++ b/sys/geom/concat/g_concat.c @@ -70,7 +70,6 @@ struct g_class g_concat_class = { .destroy_geom = g_concat_destroy_geom }; - /* * Greatest Common Divisor. */ diff --git a/sys/geom/eli/g_eli.c b/sys/geom/eli/g_eli.c index 842fce324722..0a66d7224aa1 100644 --- a/sys/geom/eli/g_eli.c +++ b/sys/geom/eli/g_eli.c @@ -176,7 +176,6 @@ struct g_class g_eli_class = { .fini = g_eli_fini }; - /* * Code paths: * BIO_READ: @@ -185,7 +184,6 @@ struct g_class g_eli_class = { * g_eli_start -> g_eli_crypto_run -> g_eli_crypto_write_done -> g_io_request -> g_eli_write_done -> g_io_deliver */ - /* * EAGAIN from crypto(9) means, that we were probably balanced to another crypto * accelerator or something like this. diff --git a/sys/geom/eli/g_eli_ctl.c b/sys/geom/eli/g_eli_ctl.c index abff51747709..8c58d6147b8c 100644 --- a/sys/geom/eli/g_eli_ctl.c +++ b/sys/geom/eli/g_eli_ctl.c @@ -49,10 +49,8 @@ __FBSDID("$FreeBSD$"); #include <geom/geom_dbg.h> #include <geom/eli/g_eli.h> - MALLOC_DECLARE(M_ELI); - static void g_eli_ctl_attach(struct gctl_req *req, struct g_class *mp) { diff --git a/sys/geom/gate/g_gate.c b/sys/geom/gate/g_gate.c index 4e1a9d4a2fb3..c8f6f4a1b3b7 100644 --- a/sys/geom/gate/g_gate.c +++ b/sys/geom/gate/g_gate.c @@ -84,7 +84,6 @@ static struct cdevsw g_gate_cdevsw = { .d_name = G_GATE_CTL_NAME }; - static struct g_gate_softc **g_gate_units; static u_int g_gate_nunits; static struct mtx g_gate_units_lock; diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c index f7b580fa65f3..7f4dd3ca11ff 100644 --- a/sys/geom/geom_ccd.c +++ b/sys/geom/geom_ccd.c @@ -233,7 +233,6 @@ g_ccd_freesc(struct ccd_s *sc) g_free(sc); } - static int ccdinit(struct gctl_req *req, struct ccd_s *cs) { @@ -261,7 +260,6 @@ ccdinit(struct gctl_req *req, struct ccd_s *cs) cs->sc_offset = 0; else cs->sc_offset = CCD_OFFSET; - } for (ix = 0; ix < cs->sc_ndisks; ix++) { ci = &cs->sc_cinfo[ix]; @@ -359,7 +357,6 @@ ccdinterleave(struct ccd_s *cs) int ix; daddr_t size; - /* * Allocate an interleave table. The worst case occurs when each * of N disks is of a different size, resulting in N interleave diff --git a/sys/geom/geom_ctl.c b/sys/geom/geom_ctl.c index 7dbe012a3320..05274a880373 100644 --- a/sys/geom/geom_ctl.c +++ b/sys/geom/geom_ctl.c @@ -470,7 +470,6 @@ g_ctl_req(void *arg, int flag __unused) g_topology_assert(); } - static int g_ctl_ioctl_ctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thread *td) { diff --git a/sys/geom/geom_disk.c b/sys/geom/geom_disk.c index d058f5298415..620c77301be7 100644 --- a/sys/geom/geom_disk.c +++ b/sys/geom/geom_disk.c @@ -1081,7 +1081,7 @@ sysctl_disks(SYSCTL_HANDLER_ARGS) sbuf_delete(sb); return error; } - + SYSCTL_PROC(_kern, OID_AUTO, disks, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, sysctl_disks, "A", "names of available disks"); diff --git a/sys/geom/geom_dump.c b/sys/geom/geom_dump.c index 3f4f59c704b5..067ab43f7d05 100644 --- a/sys/geom/geom_dump.c +++ b/sys/geom/geom_dump.c @@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$"); #include <geom/geom_int.h> #include <geom/geom_disk.h> - static void g_confdot_consumer(struct sbuf *sb, struct g_consumer *cp) { @@ -242,7 +241,6 @@ g_conf_provider(struct sbuf *sb, struct g_provider *pp) sbuf_cat(sb, "\t</provider>\n"); } - static void g_conf_geom(struct sbuf *sb, struct g_geom *gp, struct g_provider *pp, struct g_consumer *cp) { diff --git a/sys/geom/geom_event.c b/sys/geom/geom_event.c index d87432c552de..e7cef722a32b 100644 --- a/sys/geom/geom_event.c +++ b/sys/geom/geom_event.c @@ -131,7 +131,6 @@ g_attr_changed_event(void *arg, int flag) g_topology_assert(); if (flag != EV_CANCEL && g_shutdown == 0) { - /* * Tell all consumers of the change. */ @@ -170,7 +169,7 @@ g_orphan_provider(struct g_provider *pp, int error) KASSERT(error != 0, ("g_orphan_provider(%p(%s), 0) error must be non-zero\n", pp, pp->name)); - + pp->error = error; mtx_lock(&g_eventlock); KASSERT(!(pp->flags & G_PF_ORPHAN), diff --git a/sys/geom/geom_flashmap.h b/sys/geom/geom_flashmap.h index b2ab5148f0c7..c9bdd22f93b8 100644 --- a/sys/geom/geom_flashmap.h +++ b/sys/geom/geom_flashmap.h @@ -36,4 +36,3 @@ struct g_flashmap { }; #endif - diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c index e51ef21ccda7..af0bc40b66ae 100644 --- a/sys/geom/geom_io.c +++ b/sys/geom/geom_io.c @@ -305,7 +305,7 @@ g_io_zonecmd(struct disk_zone_args *zone_args, struct g_consumer *cp) { struct bio *bp; int error; - + g_trace(G_T_BIO, "bio_zone(%d)", zone_args->zone_cmd); bp = g_alloc_bio(); bp->bio_cmd = BIO_ZONE; diff --git a/sys/geom/geom_kern.c b/sys/geom/geom_kern.c index cf13503f3efd..e06824afc9fd 100644 --- a/sys/geom/geom_kern.c +++ b/sys/geom/geom_kern.c @@ -187,7 +187,7 @@ sysctl_kern_geom_conftxt(SYSCTL_HANDLER_ARGS) return (sysctl_kern_geom_confany(req, g_conftxt, &hint)); } - + static int sysctl_kern_geom_confdot(SYSCTL_HANDLER_ARGS) { diff --git a/sys/geom/geom_map.c b/sys/geom/geom_map.c index e5f1cb649421..3d6e22c4c5ca 100644 --- a/sys/geom/geom_map.c +++ b/sys/geom/geom_map.c @@ -172,7 +172,6 @@ find_marker(struct g_consumer *cp, const char *line, off_t *offset) for (search_offset = search_start; search_offset < cp->provider->mediasize; search_offset += search_step) { - g_topology_unlock(); buf = g_read_data(cp, rounddown(search_offset, sectorsize), roundup(strlen(search_key), sectorsize), NULL); @@ -376,7 +375,6 @@ g_map_taste(struct g_class *mp, struct g_provider *pp, int insist __unused) for (i = 0; i < MAP_MAXSLICE; i++) g_map_parse_part(mp, pp, cp, gp, sc, i); - g_access(cp, -1, 0, 0); if (LIST_EMPTY(&gp->provider)) { if (bootverbose) diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c index 92090ba8355b..9b867fdade16 100644 --- a/sys/geom/geom_subr.c +++ b/sys/geom/geom_subr.c @@ -101,7 +101,7 @@ g_dbg_printf(const char *classname, int lvl, struct bio *bp, sbuf_cat(&sb, classname); if (lvl >= 0) sbuf_printf(&sb, "[%d]", lvl); - + va_start(ap, format); sbuf_vprintf(&sb, format, ap); va_end(ap); @@ -598,7 +598,6 @@ g_new_provider_event(void *arg, int flag) } } - struct g_provider * g_new_providerf(struct g_geom *gp, const char *fmt, ...) { @@ -717,7 +716,7 @@ g_resize_provider_event(void *arg, int flag) } pp->mediasize = size; - + LIST_FOREACH_SAFE(cp, &pp->consumers, consumers, cp2) { gp = cp->geom; if ((gp->flags & G_GEOM_WITHER) == 0 && gp->resize != NULL) diff --git a/sys/geom/label/g_label.c b/sys/geom/label/g_label.c index ceb9d9d83d83..169f5b49966e 100644 --- a/sys/geom/label/g_label.c +++ b/sys/geom/label/g_label.c @@ -203,7 +203,6 @@ g_label_mangle_name(char *label, size_t size) if (*label == '\0') return; - sb = sbuf_new(NULL, NULL, size, SBUF_FIXEDLEN); for (c = label; *c != '\0'; c++) { /* Trim leading whitespace. */ diff --git a/sys/geom/label/g_label_disk_ident.c b/sys/geom/label/g_label_disk_ident.c index 39789f91dc9a..ac0e8dd83ce1 100644 --- a/sys/geom/label/g_label_disk_ident.c +++ b/sys/geom/label/g_label_disk_ident.c @@ -39,7 +39,6 @@ __FBSDID("$FreeBSD$"); #include <geom/label/g_label.h> #include <geom/multipath/g_multipath.h> - static char* classes_pass[] = { G_DISK_CLASS_NAME, G_MULTIPATH_CLASS_NAME, NULL }; diff --git a/sys/geom/label/g_label_iso9660.c b/sys/geom/label/g_label_iso9660.c index d35f090cd616..bd44a38cb972 100644 --- a/sys/geom/label/g_label_iso9660.c +++ b/sys/geom/label/g_label_iso9660.c @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); #define ISO9660_OFFSET 0x8000 #define VOLUME_LEN 32 - static void g_label_iso9660_taste(struct g_consumer *cp, char *label, size_t size) { diff --git a/sys/geom/label/g_label_msdosfs.c b/sys/geom/label/g_label_msdosfs.c index e02d95c0180c..d6ccb8b334ee 100644 --- a/sys/geom/label/g_label_msdosfs.c +++ b/sys/geom/label/g_label_msdosfs.c @@ -82,7 +82,6 @@ g_label_msdosfs_taste(struct g_consumer *cp, char *label, size_t size) goto error; } - /* * Test if this is really a FAT volume and determine the FAT type. */ diff --git a/sys/geom/mirror/g_mirror.c b/sys/geom/mirror/g_mirror.c index 6df11c04d804..4b8d034fb3cc 100644 --- a/sys/geom/mirror/g_mirror.c +++ b/sys/geom/mirror/g_mirror.c @@ -110,7 +110,6 @@ struct g_class g_mirror_class = { .resize = g_mirror_resize }; - static void g_mirror_destroy_provider(struct g_mirror_softc *sc); static int g_mirror_update_disk(struct g_mirror_disk *disk, u_int state); static void g_mirror_update_device(struct g_mirror_softc *sc, bool force); @@ -125,7 +124,6 @@ static void g_mirror_register_request(struct g_mirror_softc *sc, struct bio *bp); static void g_mirror_sync_release(struct g_mirror_softc *sc); - static const char * g_mirror_disk_state2str(int state) { diff --git a/sys/geom/mountver/g_mountver.c b/sys/geom/mountver/g_mountver.c index 4d48e6bfdb78..ce0c4fa5acd2 100644 --- a/sys/geom/mountver/g_mountver.c +++ b/sys/geom/mountver/g_mountver.c @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include <geom/geom_dbg.h> #include <geom/mountver/g_mountver.h> - SYSCTL_DECL(_kern_geom); static SYSCTL_NODE(_kern_geom, OID_AUTO, mountver, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "GEOM_MOUNTVER stuff"); @@ -555,7 +554,7 @@ g_mountver_ident_matches(struct g_geom *gp) return (0); } - + static struct g_geom * g_mountver_taste(struct g_class *mp, struct g_provider *pp, int flags __unused) { diff --git a/sys/geom/multipath/g_multipath.c b/sys/geom/multipath/g_multipath.c index 9b7845ab5256..e1018b87211b 100644 --- a/sys/geom/multipath/g_multipath.c +++ b/sys/geom/multipath/g_multipath.c @@ -479,7 +479,6 @@ g_multipath_kt(void *arg) kproc_exit(0); } - static int g_multipath_access(struct g_provider *pp, int dr, int dw, int de) { diff --git a/sys/geom/nop/g_nop.c b/sys/geom/nop/g_nop.c index 75d4f44f2627..2cfb5a6c4281 100644 --- a/sys/geom/nop/g_nop.c +++ b/sys/geom/nop/g_nop.c @@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$"); #include <geom/geom_dbg.h> #include <geom/nop/g_nop.h> - SYSCTL_DECL(_kern_geom); static SYSCTL_NODE(_kern_geom, OID_AUTO, nop, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "GEOM_NOP stuff"); diff --git a/sys/geom/part/g_part.c b/sys/geom/part/g_part.c index 1470b159b75f..e045bdef1600 100644 --- a/sys/geom/part/g_part.c +++ b/sys/geom/part/g_part.c @@ -317,7 +317,6 @@ g_part_get_physpath_done(struct bio *bp) g_std_done(bp); } - #define DPRINTF(...) if (bootverbose) { \ printf("GEOM_PART: " __VA_ARGS__); \ } diff --git a/sys/geom/part/g_part_bsd64.c b/sys/geom/part/g_part_bsd64.c index 4f73957ba1b3..bc0112fbb7ed 100644 --- a/sys/geom/part/g_part_bsd64.c +++ b/sys/geom/part/g_part_bsd64.c @@ -663,4 +663,3 @@ g_part_bsd64_write(struct g_part_table *basetable, struct g_consumer *cp) g_free(dlp); return (error); } - diff --git a/sys/geom/part/g_part_ebr.c b/sys/geom/part/g_part_ebr.c index 0d372ec5d730..f7aaf1c45cb6 100644 --- a/sys/geom/part/g_part_ebr.c +++ b/sys/geom/part/g_part_ebr.c @@ -210,7 +210,6 @@ ebr_parse_type(const char *type, u_char *dp_typ) return (EINVAL); } - static void ebr_set_chs(struct g_part_table *table, uint32_t lba, u_char *cylp, u_char *hdp, u_char *secp) @@ -249,7 +248,6 @@ ebr_align(struct g_part_table *basetable, uint32_t *start, uint32_t *size) return (0); } - static int g_part_ebr_add(struct g_part_table *basetable, struct g_part_entry *baseentry, struct g_part_parms *gpp) diff --git a/sys/geom/part/g_part_ldm.c b/sys/geom/part/g_part_ldm.c index 42f37580f6a2..6debf39d04f7 100644 --- a/sys/geom/part/g_part_ldm.c +++ b/sys/geom/part/g_part_ldm.c @@ -1286,7 +1286,6 @@ g_part_ldm_probe(struct g_part_table *basetable, struct g_consumer *cp) u_char *buf, type[64]; int error, idx; - pp = cp->provider; if (pp->sectorsize != 512) return (ENXIO); diff --git a/sys/geom/raid/g_raid_ctl.c b/sys/geom/raid/g_raid_ctl.c index 228c86c9ca1e..7ca4a8588d02 100644 --- a/sys/geom/raid/g_raid_ctl.c +++ b/sys/geom/raid/g_raid_ctl.c @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include <geom/raid/g_raid.h> #include "g_raid_md_if.h" - static struct g_raid_softc * g_raid_find_node(struct g_class *mp, const char *name) { diff --git a/sys/geom/raid/md_ddf.c b/sys/geom/raid/md_ddf.c index db919d96fa0b..68c058da61f4 100644 --- a/sys/geom/raid/md_ddf.c +++ b/sys/geom/raid/md_ddf.c @@ -2270,7 +2270,6 @@ g_raid_md_ctl_ddf(struct g_raid_md_object *md, error = 0; if (strcmp(verb, "label") == 0) { - if (*nargs < 4) { gctl_error(req, "Invalid number of arguments."); return (-1); @@ -2511,13 +2510,11 @@ g_raid_md_ctl_ddf(struct g_raid_md_object *md, return (0); } if (strcmp(verb, "add") == 0) { - gctl_error(req, "`add` command is not applicable, " "use `label` instead."); return (-99); } if (strcmp(verb, "delete") == 0) { - nodename = gctl_get_asciiparam(req, "arg0"); if (nodename != NULL && strcasecmp(sc->sc_name, nodename) != 0) nodename = NULL; diff --git a/sys/geom/raid/md_intel.c b/sys/geom/raid/md_intel.c index 634ea30fbfe5..80ec182c53be 100644 --- a/sys/geom/raid/md_intel.c +++ b/sys/geom/raid/md_intel.c @@ -261,7 +261,6 @@ static struct g_raid_md_class g_raid_md_intel_class = { .mdc_priority = 100 }; - static struct intel_raid_map * intel_get_map(struct intel_raid_vol *mvol, int i) { @@ -1454,7 +1453,7 @@ g_raid_md_get_label(struct g_consumer *cp, char *serial, int serlen) { char serial_buffer[DISK_IDENT_SIZE]; int len, error; - + len = sizeof(serial_buffer); error = g_io_getattr("GEOM::ident", cp, &len, serial_buffer); if (error != 0) @@ -1712,7 +1711,6 @@ g_raid_md_ctl_intel(struct g_raid_md_object *md, nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); error = 0; if (strcmp(verb, "label") == 0) { - if (*nargs < 4) { gctl_error(req, "Invalid number of arguments."); return (-1); @@ -1921,7 +1919,6 @@ g_raid_md_ctl_intel(struct g_raid_md_object *md, return (0); } if (strcmp(verb, "add") == 0) { - if (*nargs != 3) { gctl_error(req, "Invalid number of arguments."); return (-1); @@ -2108,7 +2105,6 @@ g_raid_md_ctl_intel(struct g_raid_md_object *md, return (0); } if (strcmp(verb, "delete") == 0) { - nodename = gctl_get_asciiparam(req, "arg0"); if (nodename != NULL && strcasecmp(sc->sc_name, nodename) != 0) nodename = NULL; diff --git a/sys/geom/raid/md_jmicron.c b/sys/geom/raid/md_jmicron.c index 8f844b58a849..d0387bef4de0 100644 --- a/sys/geom/raid/md_jmicron.c +++ b/sys/geom/raid/md_jmicron.c @@ -527,7 +527,6 @@ nofit: /* Welcome the new disk. */ g_raid_change_disk_state(disk, G_RAID_DISK_S_ACTIVE); TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) { - /* * Different disks may have different sizes/offsets, * especially in concat mode. Update. @@ -1044,7 +1043,6 @@ g_raid_md_ctl_jmicron(struct g_raid_md_object *md, nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); error = 0; if (strcmp(verb, "label") == 0) { - if (*nargs < 4) { gctl_error(req, "Invalid number of arguments."); return (-1); @@ -1238,7 +1236,6 @@ g_raid_md_ctl_jmicron(struct g_raid_md_object *md, return (0); } if (strcmp(verb, "delete") == 0) { - /* Check if some volume is still open. */ force = gctl_get_paraml(req, "force", sizeof(*force)); if (force != NULL && *force == 0 && diff --git a/sys/geom/raid/md_nvidia.c b/sys/geom/raid/md_nvidia.c index fb7f7253de41..1c758df5157d 100644 --- a/sys/geom/raid/md_nvidia.c +++ b/sys/geom/raid/md_nvidia.c @@ -535,7 +535,6 @@ nofit: // else // g_raid_change_disk_state(disk, G_RAID_DISK_S_FAILED); TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) { - /* * Different disks may have different sizes, * in concat mode. Update from real disk size. @@ -1048,7 +1047,6 @@ g_raid_md_ctl_nvidia(struct g_raid_md_object *md, nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); error = 0; if (strcmp(verb, "label") == 0) { - if (*nargs < 4) { gctl_error(req, "Invalid number of arguments."); return (-1); @@ -1243,7 +1241,6 @@ g_raid_md_ctl_nvidia(struct g_raid_md_object *md, return (0); } if (strcmp(verb, "delete") == 0) { - /* Check if some volume is still open. */ force = gctl_get_paraml(req, "force", sizeof(*force)); if (force != NULL && *force == 0 && diff --git a/sys/geom/raid/md_promise.c b/sys/geom/raid/md_promise.c index 898b67590eb5..bec52d26a7c6 100644 --- a/sys/geom/raid/md_promise.c +++ b/sys/geom/raid/md_promise.c @@ -189,7 +189,6 @@ static struct g_raid_md_class g_raid_md_promise_class = { .mdc_priority = 100 }; - static void g_raid_md_promise_print(struct promise_raid_conf *meta) { @@ -1281,7 +1280,6 @@ g_raid_md_ctl_promise(struct g_raid_md_object *md, nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); error = 0; if (strcmp(verb, "label") == 0) { - if (*nargs < 4) { gctl_error(req, "Invalid number of arguments."); return (-1); @@ -1502,13 +1500,11 @@ g_raid_md_ctl_promise(struct g_raid_md_object *md, return (0); } if (strcmp(verb, "add") == 0) { - gctl_error(req, "`add` command is not applicable, " "use `label` instead."); return (-99); } if (strcmp(verb, "delete") == 0) { - nodename = gctl_get_asciiparam(req, "arg0"); if (nodename != NULL && strcasecmp(sc->sc_name, nodename) != 0) nodename = NULL; diff --git a/sys/geom/raid/md_sii.c b/sys/geom/raid/md_sii.c index fbc9b1ae85e8..c8de0c8db8e9 100644 --- a/sys/geom/raid/md_sii.c +++ b/sys/geom/raid/md_sii.c @@ -586,7 +586,6 @@ nofit: else g_raid_change_disk_state(disk, G_RAID_DISK_S_FAILED); TAILQ_FOREACH(sd, &disk->d_subdisks, sd_next) { - /* * Different disks may have different sizes, * in concat mode. Update from real disk size. @@ -1132,7 +1131,6 @@ g_raid_md_ctl_sii(struct g_raid_md_object *md, nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); error = 0; if (strcmp(verb, "label") == 0) { - if (*nargs < 4) { gctl_error(req, "Invalid number of arguments."); return (-1); @@ -1325,7 +1323,6 @@ g_raid_md_ctl_sii(struct g_raid_md_object *md, return (0); } if (strcmp(verb, "delete") == 0) { - /* Check if some volume is still open. */ force = gctl_get_paraml(req, "force", sizeof(*force)); if (force != NULL && *force == 0 && diff --git a/sys/geom/raid/tr_concat.c b/sys/geom/raid/tr_concat.c index 96b15111e767..dca728bf6dc4 100644 --- a/sys/geom/raid/tr_concat.c +++ b/sys/geom/raid/tr_concat.c @@ -123,7 +123,6 @@ g_raid_tr_update_state_concat(struct g_raid_volume *vol) s = G_RAID_VOLUME_S_BROKEN; } if (s != vol->v_state) { - /* * Some metadata modules may not know CONCAT volume * mediasize until all disks connected. Recalculate. diff --git a/sys/geom/raid/tr_raid1.c b/sys/geom/raid/tr_raid1.c index 3daf8b953d8d..63bea0945c9c 100644 --- a/sys/geom/raid/tr_raid1.c +++ b/sys/geom/raid/tr_raid1.c @@ -401,7 +401,6 @@ g_raid_tr_raid1_rebuild_start(struct g_raid_tr_object *tr) g_raid_tr_raid1_rebuild_some(tr); } - static void g_raid_tr_raid1_maybe_rebuild(struct g_raid_tr_object *tr, struct g_raid_subdisk *sd) @@ -409,7 +408,7 @@ g_raid_tr_raid1_maybe_rebuild(struct g_raid_tr_object *tr, struct g_raid_volume *vol; struct g_raid_tr_raid1_object *trs; int na, nr; - + /* * If we're stopping, don't do anything. If we don't have at least one * good disk and one bad disk, we don't do anything. And if there's a @@ -683,7 +682,6 @@ g_raid_tr_iodone_raid1(struct g_raid_tr_object *tr, */ if (trs->trso_type == TR_RAID1_REBUILD) { if (bp->bio_cmd == BIO_READ) { - /* Immediately abort rebuild, if requested. */ if (trs->trso_flags & TR_RAID1_F_ABORT) { trs->trso_flags &= ~TR_RAID1_F_DOING_SOME; diff --git a/sys/geom/raid/tr_raid1e.c b/sys/geom/raid/tr_raid1e.c index 6f84a46fb886..45a48acfd3b2 100644 --- a/sys/geom/raid/tr_raid1e.c +++ b/sys/geom/raid/tr_raid1e.c @@ -560,7 +560,7 @@ g_raid_tr_raid1e_maybe_rebuild(struct g_raid_tr_object *tr, struct g_raid_volume *vol; struct g_raid_tr_raid1e_object *trs; int nr; - + vol = tr->tro_volume; trs = (struct g_raid_tr_raid1e_object *)tr; if (trs->trso_stopping) @@ -899,7 +899,6 @@ g_raid_tr_iodone_raid1e(struct g_raid_tr_object *tr, if (trs->trso_type == TR_RAID1E_REBUILD) { nsd = trs->trso_failed_sd; if (bp->bio_cmd == BIO_READ) { - /* Immediately abort rebuild, if requested. */ if (trs->trso_flags & TR_RAID1E_F_ABORT) { trs->trso_flags &= ~TR_RAID1E_F_DOING_SOME; diff --git a/sys/geom/raid3/g_raid3.c b/sys/geom/raid3/g_raid3.c index 2a7afaee511f..aa59465e8b4e 100644 --- a/sys/geom/raid3/g_raid3.c +++ b/sys/geom/raid3/g_raid3.c @@ -117,7 +117,6 @@ struct g_class g_raid3_class = { .fini = g_raid3_fini }; - static void g_raid3_destroy_provider(struct g_raid3_softc *sc); static int g_raid3_update_disk(struct g_raid3_disk *disk, u_int state); static void g_raid3_update_device(struct g_raid3_softc *sc, boolean_t force); @@ -127,7 +126,6 @@ static void g_raid3_sync_stop(struct g_raid3_softc *sc, int type); static int g_raid3_register_request(struct bio *pbp); static void g_raid3_sync_release(struct g_raid3_softc *sc); - static const char * g_raid3_disk_state2str(int state) { diff --git a/sys/geom/raid3/g_raid3_ctl.c b/sys/geom/raid3/g_raid3_ctl.c index 1fb81501e87d..7d913b6df1b0 100644 --- a/sys/geom/raid3/g_raid3_ctl.c +++ b/sys/geom/raid3/g_raid3_ctl.c @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); #include <sys/kthread.h> #include <geom/raid3/g_raid3.h> - static struct g_raid3_softc * g_raid3_find_device(struct g_class *mp, const char *name) { diff --git a/sys/geom/uzip/g_uzip_wrkthr.h b/sys/geom/uzip/g_uzip_wrkthr.h index 8492378b4aaf..2e07491f6b12 100644 --- a/sys/geom/uzip/g_uzip_wrkthr.h +++ b/sys/geom/uzip/g_uzip_wrkthr.h @@ -27,4 +27,3 @@ */ void g_uzip_wrkthr(void *); - diff --git a/sys/geom/vinum/geom_vinum.c b/sys/geom/vinum/geom_vinum.c index 7f749e40054b..0c60a051619f 100644 --- a/sys/geom/vinum/geom_vinum.c +++ b/sys/geom/vinum/geom_vinum.c @@ -61,14 +61,13 @@ static void gv_attach(struct gv_softc *, struct gctl_req *); static void gv_detach(struct gv_softc *, struct gctl_req *); static void gv_parityop(struct gv_softc *, struct gctl_req *); - static void gv_orphan(struct g_consumer *cp) { struct g_geom *gp; struct gv_softc *sc; struct gv_drive *d; - + g_topology_assert(); KASSERT(cp != NULL, ("gv_orphan: null cp")); @@ -89,7 +88,7 @@ gv_start(struct bio *bp) { struct g_geom *gp; struct gv_softc *sc; - + gp = bp->bio_to->geom; sc = gp->softc; @@ -114,7 +113,7 @@ gv_done(struct bio *bp) { struct g_geom *gp; struct gv_softc *sc; - + KASSERT(bp != NULL, ("NULL bp")); gp = bp->bio_from->geom; @@ -133,7 +132,7 @@ gv_access(struct g_provider *pp, int dr, int dw, int de) struct gv_softc *sc; struct gv_drive *d, *d2; int error; - + gp = pp->geom; sc = gp->softc; /* @@ -367,7 +366,6 @@ gv_create(struct g_geom *gp, struct gctl_req *req) goto error; } - d = g_malloc(sizeof(*d), M_WAITOK | M_ZERO); bcopy(d2, d, sizeof(*d)); @@ -513,7 +511,7 @@ gv_config(struct gctl_req *req, struct g_class *mp, char const *verb) } else if (!strcmp(verb, "rename")) { gv_rename(gp, req); - + } else if (!strcmp(verb, "resetconfig")) { gv_post_event(sc, GV_EVENT_RESET_CONFIG, sc, NULL, 0, 0); @@ -581,7 +579,6 @@ gv_parityop(struct gv_softc *sc, struct gctl_req *req) gv_post_event(sc, GV_EVENT_PARITY_CHECK, p, NULL, 0, 0); } - static struct g_geom * gv_taste(struct g_class *mp, struct g_provider *pp, int flags __unused) { diff --git a/sys/geom/vinum/geom_vinum.h b/sys/geom/vinum/geom_vinum.h index e61e9dc5f0a9..5fc18e0280ce 100644 --- a/sys/geom/vinum/geom_vinum.h +++ b/sys/geom/vinum/geom_vinum.h @@ -77,7 +77,6 @@ void gv_rm_drive(struct gv_softc *, struct gv_drive *, int); void gv_rm_plex(struct gv_softc *, struct gv_plex *); void gv_rm_vol(struct gv_softc *, struct gv_volume *); - /* geom_vinum_state.c */ int gv_sdstatemap(struct gv_plex *); void gv_setstate(struct g_geom *, struct gctl_req *); diff --git a/sys/geom/vinum/geom_vinum_drive.c b/sys/geom/vinum/geom_vinum_drive.c index 788dd9769326..055a60df3468 100644 --- a/sys/geom/vinum/geom_vinum_drive.c +++ b/sys/geom/vinum/geom_vinum_drive.c @@ -71,7 +71,6 @@ static int gv_legacy_header_type(uint8_t *, int); * format uses big-endian (network order). */ - /* Checks for legacy format depending on platform. */ static int gv_legacy_header_type(uint8_t *hdr, int bigendian) diff --git a/sys/geom/vinum/geom_vinum_init.c b/sys/geom/vinum/geom_vinum_init.c index 43dab4dd57b2..115a3c66d445 100644 --- a/sys/geom/vinum/geom_vinum_init.c +++ b/sys/geom/vinum/geom_vinum_init.c @@ -241,7 +241,6 @@ gv_sync(struct gv_volume *v) sc = v->vinumconf; KASSERT(sc != NULL, ("gv_sync: NULL sc on %s", v->name)); - up = gv_find_good_plex(v); if (up == NULL) return (ENXIO); diff --git a/sys/geom/vinum/geom_vinum_list.c b/sys/geom/vinum/geom_vinum_list.c index efcc75b67e9e..bc079d57387c 100644 --- a/sys/geom/vinum/geom_vinum_list.c +++ b/sys/geom/vinum/geom_vinum_list.c @@ -228,7 +228,7 @@ gv_lv(struct g_geom *gp, struct gctl_req *req, struct sbuf *sb) LIST_FOREACH(v, &sc->volumes, volume) i++; - + sbuf_printf(sb, "%d volume%s:\n", i, i == 1 ? "" : "s"); if (i) { @@ -374,7 +374,7 @@ gv_ls(struct g_geom *gp, struct gctl_req *req, struct sbuf *sb) LIST_FOREACH(s, &sc->subdisks, sd) i++; - + sbuf_printf(sb, "%d subdisk%s:\n", i, i == 1 ? "" : "s"); if (i) { @@ -449,7 +449,7 @@ gv_ld(struct g_geom *gp, struct gctl_req *req, struct sbuf *sb) LIST_FOREACH(d, &sc->drives, drive) i++; - + sbuf_printf(sb, "%d drive%s:\n", i, i == 1 ? "" : "s"); if (i) { diff --git a/sys/geom/vinum/geom_vinum_plex.c b/sys/geom/vinum/geom_vinum_plex.c index e4553817346c..a7b1e1e5a8bd 100644 --- a/sys/geom/vinum/geom_vinum_plex.c +++ b/sys/geom/vinum/geom_vinum_plex.c @@ -78,7 +78,7 @@ gv_plex_start(struct gv_plex *p, struct bio *bp) wp = gv_raid5_start(p, bp, addr, boff, bcount); if (wp == NULL) return; - + len = wp->length; if (TAILQ_EMPTY(&wp->bits)) @@ -499,7 +499,6 @@ gv_check_parity(struct gv_plex *p, struct bio *bp, struct gv_raid5_packet *wp) bp->bio_parent->bio_inbed++; g_destroy_bio(pbp); } - } return (finished); @@ -776,7 +775,6 @@ gv_grow_complete(struct gv_plex *p, struct bio *bp) } } - /* * Create an initialization BIO and send it off to the consumer. Assume that * we're given initialization data as parameter. @@ -1019,7 +1017,7 @@ gv_rebuild_complete(struct gv_plex *p, struct bio *bp) g_topology_lock(); gv_access(p->vol_sc->provider, -1, -1, 0); g_topology_unlock(); - + G_VINUM_DEBUG(0, "rebuild of %s failed at offset %jd errno: %d", p->name, (intmax_t)offset, error); p->flags &= ~GV_PLEX_REBUILDING; @@ -1035,7 +1033,7 @@ gv_rebuild_complete(struct gv_plex *p, struct bio *bp) g_topology_lock(); gv_access(p->vol_sc->provider, -1, -1, 0); g_topology_unlock(); - + G_VINUM_DEBUG(1, "rebuild of %s finished", p->name); gv_save_config(p->vinumconf); p->flags &= ~GV_PLEX_REBUILDING; diff --git a/sys/geom/vinum/geom_vinum_raid5.c b/sys/geom/vinum/geom_vinum_raid5.c index b466b01346ce..2778646467e2 100644 --- a/sys/geom/vinum/geom_vinum_raid5.c +++ b/sys/geom/vinum/geom_vinum_raid5.c @@ -80,7 +80,7 @@ gv_raid5_start(struct gv_plex *p, struct bio *bp, caddr_t addr, off_t boff, g_free(wp); return (NULL); } - + /* * Building the sub-request failed, we probably need to clean up a lot. */ diff --git a/sys/geom/vinum/geom_vinum_share.c b/sys/geom/vinum/geom_vinum_share.c index feac8cf8f9b7..96f6f39048d7 100644 --- a/sys/geom/vinum/geom_vinum_share.c +++ b/sys/geom/vinum/geom_vinum_share.c @@ -80,9 +80,8 @@ gv_tokenize(char *cptr, char *token[], int maxtoken) { int tokennr; /* Index of this token. */ char delim; /* Delimiter for searching for the partner. */ - - for (tokennr = 0; tokennr < maxtoken;) { + for (tokennr = 0; tokennr < maxtoken;) { /* Skip leading white space. */ while (iswhite(*cptr)) cptr++; @@ -137,7 +136,6 @@ gv_tokenize(char *cptr, char *token[], int maxtoken) return maxtoken; } - /* * Take a number with an optional scale factor and convert it to a number of * bytes. @@ -159,7 +157,7 @@ gv_sizespec(char *spec) uint64_t size; char *s; int sign; - + size = 0; sign = 1; if (spec != NULL) { /* we have a parameter */ @@ -171,7 +169,6 @@ gv_sizespec(char *spec) /* It's numeric. */ if ((*s >= '0') && (*s <= '9')) { - /* It's numeric. */ while ((*s >= '0') && (*s <= '9')) /* Convert it. */ @@ -599,8 +596,6 @@ gv_new_plex(int max, char *token[]) return (p); } - - /* Get a new subdisk object. */ struct gv_sd * gv_new_sd(int max, char *token[]) @@ -707,7 +702,7 @@ const char * gv_roughlength(off_t bytes, int lj) { static char desc[16]; - + /* Gigabytes. */ if (bytes > (off_t)MEGABYTE * 10000) snprintf(desc, sizeof(desc), lj ? "%jd GB" : "%10jd GB", diff --git a/sys/geom/vinum/geom_vinum_state.c b/sys/geom/vinum/geom_vinum_state.c index 5c6beec6835b..867240ff2157 100644 --- a/sys/geom/vinum/geom_vinum_state.c +++ b/sys/geom/vinum/geom_vinum_state.c @@ -130,7 +130,7 @@ gv_set_drive_state(struct gv_drive *d, int newstate, int flags) KASSERT(d != NULL, ("gv_set_drive_state: NULL d")); oldstate = d->state; - + if (newstate == oldstate) return (0); @@ -166,7 +166,7 @@ gv_set_sd_state(struct gv_sd *s, int newstate, int flags) /* We are optimistic and assume it will work. */ status = 0; - + if (newstate == oldstate) return (0); @@ -385,7 +385,7 @@ gv_update_sd_state(struct gv_sd *s) KASSERT(d != NULL, ("gv_update_sd_state: NULL d")); oldstate = s->state; - + /* If our drive isn't up we cannot be up either. */ if (d->state != GV_DRIVE_UP) { s->state = GV_SD_DOWN; @@ -401,7 +401,7 @@ gv_update_sd_state(struct gv_sd *s) s->state = GV_SD_STALE; } else s->state = GV_SD_UP; - + if (s->state != oldstate) G_VINUM_DEBUG(1, "subdisk %s state change: %s -> %s", s->name, gv_sdstate(oldstate), gv_sdstate(s->state)); @@ -425,7 +425,7 @@ gv_update_plex_state(struct gv_plex *p) /* First, check the state of our subdisks. */ sdstates = gv_sdstatemap(p); - + /* If all subdisks are up, our plex can be up, too. */ if (sdstates == GV_SD_UPSTATE) p->state = GV_PLEX_UP; @@ -440,7 +440,6 @@ gv_update_plex_state(struct gv_plex *p) /* Some of our subdisks are initializing. */ } else if (sdstates & GV_SD_INITSTATE) { - if (p->flags & GV_PLEX_SYNCING || p->flags & GV_PLEX_REBUILDING) p->state = GV_PLEX_DEGRADED; @@ -507,7 +506,7 @@ gv_sdstatemap(struct gv_plex *p) int statemap; KASSERT(p != NULL, ("gv_sdstatemap: NULL p")); - + statemap = 0; p->sddown = 0; /* No subdisks down yet. */ diff --git a/sys/geom/vinum/geom_vinum_subr.c b/sys/geom/vinum/geom_vinum_subr.c index ce9c689fb66b..13edf928b6ad 100644 --- a/sys/geom/vinum/geom_vinum_subr.c +++ b/sys/geom/vinum/geom_vinum_subr.c @@ -648,7 +648,6 @@ gv_sd_to_drive(struct gv_sd *s, struct gv_drive *d) /* No drive offset given, try to calculate it. */ if (s->drive_offset == -1) { - /* Add offsets and sizes from other subdisks on this drive. */ LIST_FOREACH(s2, &d->subdisks, from_drive) { s->drive_offset = s2->drive_offset + s2->size; @@ -784,7 +783,6 @@ gv_free_sd(struct gv_sd *s) /* If there is no free slot behind this subdisk, so create one. */ if (fl == NULL) { - fl = g_malloc(sizeof(*fl), M_WAITOK | M_ZERO); fl->size = s->size; fl->offset = s->drive_offset; @@ -835,7 +833,6 @@ gv_adjust_freespace(struct gv_sd *s, off_t remainder) /* If there is no free slot behind this subdisk, so create one. */ if (fl == NULL) { - fl = g_malloc(sizeof(*fl), M_WAITOK | M_ZERO); fl->size = remainder; fl->offset = s->drive_offset + s->size - remainder; diff --git a/sys/geom/virstor/binstream.c b/sys/geom/virstor/binstream.c index 367cd862fd17..f52ce738b17b 100644 --- a/sys/geom/virstor/binstream.c +++ b/sys/geom/virstor/binstream.c @@ -36,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include <geom/virstor/binstream.h> - /* "Open" a binary stream for reading */ void bs_open(bin_stream_t * bs, void *data) @@ -45,7 +44,6 @@ bs_open(bin_stream_t * bs, void *data) bs->pos = 0; } - /* "Reset" position in binary stream to zero */ void bs_reset(bin_stream_t * bs) @@ -66,7 +64,6 @@ bs_write_str(bin_stream_t * bs, char *data) return bs->pos; } - /* Write an arbitrary buffer; return next position */ unsigned bs_write_buf(bin_stream_t * bs, char *data, unsigned data_size) @@ -78,7 +75,6 @@ bs_write_buf(bin_stream_t * bs, char *data, unsigned data_size) return bs->pos; } - /* Write a 8bit uint; return next position. */ unsigned bs_write_u8(bin_stream_t * bs, uint8_t data) @@ -87,7 +83,6 @@ bs_write_u8(bin_stream_t * bs, uint8_t data) return ++(bs->pos); } - /* Write a 16bit uint; return next position. */ unsigned bs_write_u16(bin_stream_t * bs, uint16_t data) @@ -96,7 +91,6 @@ bs_write_u16(bin_stream_t * bs, uint16_t data) return (bs->pos += 2); } - /* Write a 32bit uint; return next position. */ unsigned bs_write_u32(bin_stream_t * bs, uint32_t data) @@ -105,7 +99,6 @@ bs_write_u32(bin_stream_t * bs, uint32_t data) return (bs->pos += 4); } - /* Write a 64bit uint; return next position. */ unsigned bs_write_u64(bin_stream_t * bs, uint64_t data) @@ -114,7 +107,6 @@ bs_write_u64(bin_stream_t * bs, uint64_t data) return (bs->pos += 8); } - /* Read a 8bit uint & return it */ uint8_t bs_read_u8(bin_stream_t * bs) @@ -124,7 +116,6 @@ bs_read_u8(bin_stream_t * bs) return data; } - /* * Read a null-terminated string from stream into a buffer; buf_size is size * of the buffer, including the final \0. Returns buf pointer or NULL if @@ -145,7 +136,6 @@ bs_read_str(bin_stream_t * bs, char *buf, unsigned buf_size) return buf; } - /* Read an arbitrary buffer. */ void bs_read_buf(bin_stream_t * bs, char *buf, unsigned buf_size) @@ -156,7 +146,6 @@ bs_read_buf(bin_stream_t * bs, char *buf, unsigned buf_size) bs->pos += buf_size; } - /* Read a 16bit uint & return it */ uint16_t bs_read_u16(bin_stream_t * bs) @@ -166,7 +155,6 @@ bs_read_u16(bin_stream_t * bs) return data; } - /* Read a 32bit uint & return it */ uint32_t bs_read_u32(bin_stream_t * bs) @@ -176,7 +164,6 @@ bs_read_u32(bin_stream_t * bs) return data; } - /* Read a 64bit uint & return it */ uint64_t bs_read_u64(bin_stream_t * bs) diff --git a/sys/geom/virstor/binstream.h b/sys/geom/virstor/binstream.h index cbecf82a48df..4171ad2e6156 100644 --- a/sys/geom/virstor/binstream.h +++ b/sys/geom/virstor/binstream.h @@ -30,7 +30,6 @@ // $Id: binstream.h,v 1.1 2006/07/05 10:47:54 ivoras Exp $ - #ifndef _BIN_STREAM_ #define _BIN_STREAM_ @@ -43,14 +42,12 @@ typedef struct { int pos; } bin_stream_t; - /* "Open" a binary stream for reading */ void bs_open (bin_stream_t * bs, void *data); /* "Reset" position in binary stream to zero */ void bs_reset (bin_stream_t * bs); - /* Write a zero-terminated string; return next position */ unsigned bs_write_str(bin_stream_t * bs, char *data); @@ -69,7 +66,6 @@ unsigned bs_write_u32(bin_stream_t * bs, uint32_t data); /* Write a 64bit uint; return next position. */ unsigned bs_write_u64(bin_stream_t * bs, uint64_t data); - /* * Read a null-terminated string from stream into a buffer; buf_size is size * of the buffer, including the final \0. Returns buf pointer or NULL if diff --git a/sys/geom/virstor/g_virstor.c b/sys/geom/virstor/g_virstor.c index 69fff73df945..8c3f644bca6d 100644 --- a/sys/geom/virstor/g_virstor.c +++ b/sys/geom/virstor/g_virstor.c @@ -397,7 +397,6 @@ virstor_ctl_add(struct gctl_req *req, struct g_class *cp) * incremented */ sc->n_components++; added++; - } /* This call to update_metadata() is critical. In case there's a * power failure in the middle of it and some components are updated @@ -683,7 +682,7 @@ g_virstor_destroy_geom(struct gctl_req *req __unused, struct g_class *mp, sc = gp->softc; KASSERT(sc != NULL, ("%s: NULL sc", __func__)); - + exitval = 0; LOG_MSG(LVL_DEBUG, "%s called for %s, sc=%p", __func__, gp->name, gp->softc); diff --git a/sys/geom/virstor/g_virstor.h b/sys/geom/virstor/g_virstor.h index dfc1a98fcfec..9f2886bafc41 100644 --- a/sys/geom/virstor/g_virstor.h +++ b/sys/geom/virstor/g_virstor.h @@ -33,7 +33,6 @@ #define G_VIRSTOR_CLASS_NAME "VIRSTOR" - #define VIRSTOR_MAP_ALLOCATED 1 struct virstor_map_entry { uint16_t flags; @@ -70,7 +69,6 @@ struct virstor_map_entry { /* superfluous debug info (large volumes of data) */ #define LVL_MOREDEBUG 15 - /* Component data */ struct g_virstor_component { struct g_consumer *gcons; @@ -82,7 +80,6 @@ struct g_virstor_component { unsigned int flags; }; - /* Internal geom instance data */ struct g_virstor_softc { struct g_geom *geom; @@ -109,7 +106,6 @@ struct g_virstor_bio_q { STAILQ_ENTRY(g_virstor_bio_q) linkage; }; - #endif /* _KERNEL */ #endif /* !_G_VIRSTOR_H_ */ diff --git a/sys/geom/virstor/g_virstor_md.c b/sys/geom/virstor/g_virstor_md.c index c7fdfb0ad459..9a9eac350abe 100644 --- a/sys/geom/virstor/g_virstor_md.c +++ b/sys/geom/virstor/g_virstor_md.c @@ -63,7 +63,6 @@ virstor_metadata_encode(struct g_virstor_metadata *md, unsigned char *data) bs_write_u16(&bs, md->flags); } - /* * Decode data from endian-independant byte stream into g_virstor_metadata * structure. diff --git a/sys/geom/virstor/g_virstor_md.h b/sys/geom/virstor/g_virstor_md.h index a73c8dee82e2..8cb47d87535d 100644 --- a/sys/geom/virstor/g_virstor_md.h +++ b/sys/geom/virstor/g_virstor_md.h @@ -28,7 +28,6 @@ * $FreeBSD$ */ - #ifndef _G_VIRSTOR_MD_H_ #define _G_VIRSTOR_MD_H_ diff --git a/sys/geom/zero/g_zero.c b/sys/geom/zero/g_zero.c index 5e14493d2c42..ef43a032d470 100644 --- a/sys/geom/zero/g_zero.c +++ b/sys/geom/zero/g_zero.c @@ -40,7 +40,6 @@ __FBSDID("$FreeBSD$"); #include <geom/geom.h> - #define G_ZERO_CLASS_NAME "ZERO" static int g_zero_clear_sysctl(SYSCTL_HANDLER_ARGS); |