diff options
76 files changed, 73 insertions, 148 deletions
diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 1f40ce5fc6fd..09a102ae0f92 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -908,7 +908,7 @@ __elfN(enforce_limits)(struct image_params *imgp, const Elf_Ehdr *hdr, } total_size += seg_size; } - + if (data_addr == 0 && data_size == 0) { data_addr = text_addr; data_size = text_size; diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index 833228c50ed0..8fbcf8ec7aeb 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -277,7 +277,6 @@ restart: * Perform each task, and continue on to the next task. */ for (sipp = sysinit; sipp < sysinit_end; sipp++) { - if ((*sipp)->subsystem == SI_SUB_DUMMY) continue; /* skip dummy task(s)*/ @@ -723,7 +722,7 @@ start_init(void *dummy) freeenv(var); } free_init_path = tmp_init_path = strdup(init_path, M_TEMP); - + while ((path = strsep(&tmp_init_path, ":")) != NULL) { if (bootverbose) printf("start_init: trying %s\n", path); diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c index 4f9b7e149f42..675113c6b2ba 100644 --- a/sys/kern/kern_acct.c +++ b/sys/kern/kern_acct.c @@ -635,7 +635,6 @@ acct_thread(void *dummy) /* Loop until we are asked to exit. */ while (!(acct_state & ACCT_EXITREQ)) { - /* Perform our periodic checks. */ acctwatch(); diff --git a/sys/kern/kern_alq.c b/sys/kern/kern_alq.c index cbcabecd0a2d..6db4ab300828 100644 --- a/sys/kern/kern_alq.c +++ b/sys/kern/kern_alq.c @@ -923,7 +923,7 @@ static int alq_load_handler(module_t mod, int what, void *arg) { int ret; - + ret = 0; switch (what) { diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index e91eac05a2dc..c215471ab2d9 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -229,7 +229,6 @@ deadlres_td_sleep_q(struct proc *p, struct thread *td, int slpticks) slptype = sleepq_type(wchan); if ((slptype == SLEEPQ_SX || slptype == SLEEPQ_LK) && tticks > slpticks) { - /* * Accordingly with provided thresholds, this thread is stuck * for too long on a sleepqueue. diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index b971b7c6d0e7..c38bbdb29f5f 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -664,7 +664,7 @@ prep_cdevsw(struct cdevsw *devsw, int flags) devsw->d_dump = dead_dump; devsw->d_kqfilter = dead_kqfilter; } - + if (devsw->d_flags & D_NEEDGIANT) { printf("WARNING: Device \"%s\" is Giant locked and may be " "deleted before FreeBSD 13.0.\n", @@ -1399,7 +1399,7 @@ clone_cleanup(struct clonedevs **cdp) struct cdev *dev; struct cdev_priv *cp; struct clonedevs *cd; - + cd = *cdp; if (cd == NULL) return; diff --git a/sys/kern/kern_cons.c b/sys/kern/kern_cons.c index d840a57332a0..751f01924d36 100644 --- a/sys/kern/kern_cons.c +++ b/sys/kern/kern_cons.c @@ -779,4 +779,3 @@ vty_set_preferred(unsigned vty) vty_prefer &= ~VTY_VT; #endif } - diff --git a/sys/kern/kern_cpu.c b/sys/kern/kern_cpu.c index d8b02f18bd3b..2f44405aef37 100644 --- a/sys/kern/kern_cpu.c +++ b/sys/kern/kern_cpu.c @@ -695,7 +695,6 @@ cf_levels_method(device_t dev, struct cf_level *levels, int *count) /* Finally, output the list of levels. */ i = 0; TAILQ_FOREACH(lev, &sc->all_levels, link) { - /* Skip levels that have a frequency that is too low. */ if (lev->total_set.freq < cf_lowest_freq) { sc->all_count--; diff --git a/sys/kern/kern_cpuset.c b/sys/kern/kern_cpuset.c index 681fce456d40..0a2c00d5594f 100644 --- a/sys/kern/kern_cpuset.c +++ b/sys/kern/kern_cpuset.c @@ -488,7 +488,7 @@ _domainset_create(struct domainset *domain, struct domainlist *freelist) else uma_zfree(domainset_zone, domain); return (ndomain); - + } /* @@ -1893,7 +1893,6 @@ kern_cpuset_setaffinity(struct thread *td, cpulevel_t level, cpuwhich_t which, error = EINVAL; goto out; } - } switch (level) { case CPU_LEVEL_ROOT: @@ -2148,7 +2147,6 @@ kern_cpuset_setdomain(struct thread *td, cpulevel_t level, cpuwhich_t which, error = EINVAL; goto out; } - } DOMAINSET_COPY(mask, &domain.ds_mask); domain.ds_policy = policy; diff --git a/sys/kern/kern_environment.c b/sys/kern/kern_environment.c index f906f3c6c838..bf6382c692f5 100644 --- a/sys/kern/kern_environment.c +++ b/sys/kern/kern_environment.c @@ -696,7 +696,6 @@ getenv_array(const char *name, void *pdata, int size, int *psize, n = 0; for (ptr = buf; *ptr != 0; ) { - value = strtoq(ptr, &end, 0); /* check if signed numbers are allowed */ diff --git a/sys/kern/kern_et.c b/sys/kern/kern_et.c index dc0efc687767..7647773e28a5 100644 --- a/sys/kern/kern_et.c +++ b/sys/kern/kern_et.c @@ -268,4 +268,3 @@ sysctl_kern_eventtimer_choice(SYSCTL_HANDLER_ARGS) SYSCTL_PROC(_kern_eventtimer, OID_AUTO, choice, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, 0, 0, sysctl_kern_eventtimer_choice, "A", "Present event timers"); - diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index f6e0c758b4ce..5c121b1f4e81 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -1561,7 +1561,7 @@ findkn: goto done; } } - + if (kev->flags & EV_DELETE) { kn_enter_flux(kn); KQ_UNLOCK(kq); diff --git a/sys/kern/kern_fail.c b/sys/kern/kern_fail.c index 2225872f8dc7..d10450ce1280 100644 --- a/sys/kern/kern_fail.c +++ b/sys/kern/kern_fail.c @@ -563,7 +563,6 @@ fail_point_eval_nontrivial(struct fail_point *fp, int *return_value) goto abort; TAILQ_FOREACH(ent, &fp_setting->fp_entry_queue, fe_entries) { - if (ent->fe_stale) continue; diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 165c34eb5c26..59032d57678c 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -704,7 +704,7 @@ do_fork(struct thread *td, struct fork_req *fr, struct proc *p2, struct thread * procdesc_finit(p2->p_procdesc, fp_procdesc); fdrop(fp_procdesc, td); } - + /* * Speculative check for PTRACE_FORK. PTRACE_FORK is not * synced with forks in progress so it is OK if we miss it diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 742b60daf621..afe9afb50471 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -3173,7 +3173,6 @@ prison_priv_check(struct ucred *cred, int priv) #endif /* VIMAGE */ switch (priv) { - /* * Allow ktrace privileges for root in jail. */ diff --git a/sys/kern/kern_ktr.c b/sys/kern/kern_ktr.c index 48b736c1b2c3..79e4b6121054 100644 --- a/sys/kern/kern_ktr.c +++ b/sys/kern/kern_ktr.c @@ -419,7 +419,7 @@ static int db_mach_vtrace(void); DB_SHOW_COMMAND(ktr, db_ktr_all) { - + tstate.cur = (ktr_idx - 1) % ktr_entries; tstate.first = -1; db_ktr_verbose = 0; diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c index e6d36e8fc6f3..e54546eec7b4 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -480,7 +480,6 @@ linker_load_file(const char *filename, linker_file_t *result) * the module was not found. */ if (foundfile) { - /* * If the file type has not been recognized by the last try * printout a message before to fail. @@ -668,7 +667,6 @@ linker_file_unload(linker_file_t file, int flags) MOD_SLOCK; for (mod = TAILQ_FIRST(&file->modules); mod; mod = module_getfnext(mod)) { - error = module_quiesce(mod); if (error != 0 && flags != LINKER_UNLOAD_FORCE) { KLD_DPF(FILE, ("linker_file_unload: module %s" @@ -2044,7 +2042,6 @@ linker_hwpmc_list_objects(void) M_LINKER, M_WAITOK | M_ZERO); i = 0; TAILQ_FOREACH(lf, &linker_files, link) { - /* Save the info for this linker file. */ kobase[i].pm_file = lf->filename; kobase[i].pm_address = (uintptr_t)lf->address; diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index 215d7b71b539..1490e0595714 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -364,7 +364,6 @@ retry_sleepq: } } else { - /* * Exclusive waiters sleeping with LK_SLEEPFAIL on * and using interruptible sleeps/timeout may have @@ -1186,7 +1185,6 @@ lockmgr_xunlock_hard(struct lock *lk, uintptr_t x, u_int flags, struct lock_obje queue = SQ_SHARED_QUEUE; } } else { - /* * Exclusive waiters sleeping with LK_SLEEPFAIL * on and using interruptible sleeps/timeout @@ -1486,7 +1484,6 @@ __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk, queue = SQ_EXCLUSIVE_QUEUE; v &= ~LK_EXCLUSIVE_WAITERS; } else { - /* * Exclusive waiters sleeping with * LK_SLEEPFAIL on and using diff --git a/sys/kern/kern_lockf.c b/sys/kern/kern_lockf.c index 0053df3eea77..8a54e4700d20 100644 --- a/sys/kern/kern_lockf.c +++ b/sys/kern/kern_lockf.c @@ -441,7 +441,6 @@ lf_advlockasync(struct vop_advlockasync_args *ap, struct lockf **statep, * Convert the flock structure into a start and end. */ switch (fl->l_whence) { - case SEEK_SET: case SEEK_CUR: /* @@ -2440,7 +2439,7 @@ graph_free_vertex(struct owner_graph *g, struct owner_vertex *v) int i; sx_assert(&lf_owner_graph_lock, SX_XLOCKED); - + KASSERT(LIST_EMPTY(&v->v_outedges), ("Freeing vertex with edges")); KASSERT(LIST_EMPTY(&v->v_inedges), ("Freeing vertex with edges")); diff --git a/sys/kern/kern_malloc.c b/sys/kern/kern_malloc.c index 4ec2cc4a219a..03a06878fe38 100644 --- a/sys/kern/kern_malloc.c +++ b/sys/kern/kern_malloc.c @@ -1108,7 +1108,6 @@ mallocinit(void *dummy) } for (;i <= size; i+= KMEM_ZBASE) kmemsize[i >> KMEM_ZSHIFT] = indx; - } } SYSINIT(kmem, SI_SUB_KMEM, SI_ORDER_SECOND, mallocinit, NULL); @@ -1260,7 +1259,6 @@ sysctl_kern_malloc_stats(SYSCTL_HANDLER_ARGS) for (; i < MAXCPU; i++) { (void)sbuf_bcat(&sbuf, &zeromts, sizeof(zeromts)); } - } mtx_unlock(&malloc_mtx); error = sbuf_finish(&sbuf); diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index dfd626f0de77..acb9cc72c772 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -1427,7 +1427,6 @@ m_getm2(struct mbuf *m, int len, int how, short type, int flags) if (len > MCLBYTES) { mb = m_getjcl(M_NOWAIT, type, (flags & M_PKTHDR), MJUMPAGESIZE); - } if (mb == NULL) { if (len >= MINCLSIZE) diff --git a/sys/kern/kern_module.c b/sys/kern/kern_module.c index 11caf35af016..97dca7185319 100644 --- a/sys/kern/kern_module.c +++ b/sys/kern/kern_module.c @@ -200,7 +200,7 @@ module_release(module_t mod) panic("module_release: bad reference count"); MOD_DPF(REFS, ("module_release: before, refs=%d\n", mod->refs)); - + mod->refs--; if (mod->refs == 0) { TAILQ_REMOVE(&modules, mod, link); diff --git a/sys/kern/kern_ntptime.c b/sys/kern/kern_ntptime.c index 89b1f74bbdbb..c1bdc962d5b7 100644 --- a/sys/kern/kern_ntptime.c +++ b/sys/kern/kern_ntptime.c @@ -514,7 +514,6 @@ ntp_update_second(int64_t *adjustment, time_t *newsec) * is always monotonic. */ switch (time_state) { - /* * No warning. */ @@ -588,7 +587,7 @@ ntp_update_second(int64_t *adjustment, time_t *newsec) time_adj = ftemp; L_SUB(time_offset, ftemp); L_ADD(time_adj, time_freq); - + /* * Apply any correction from adjtime(2). If more than one second * off we slew at a rate of 5ms/s (5000 PPM) else 500us/s (500PPM) diff --git a/sys/kern/kern_pmc.c b/sys/kern/kern_pmc.c index e6a5a571c978..88e87f25cd2c 100644 --- a/sys/kern/kern_pmc.c +++ b/sys/kern/kern_pmc.c @@ -364,4 +364,3 @@ init_hwpmc(void *dummy __unused) } SYSINIT(hwpmc, SI_SUB_KDTRACE, SI_ORDER_FIRST, init_hwpmc, NULL); - diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index af7357dc790b..bb8764799a53 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -1613,7 +1613,6 @@ sysctl_kern_proc_iterate(struct proc *p, void *origarg) * do by session. */ switch (oid_number) { - case KERN_PROC_GID: if (p->p_ucred->cr_gid != (gid_t)name[0]) goto skip; @@ -1667,7 +1666,6 @@ sysctl_kern_proc_iterate(struct proc *p, void *origarg) default: break; - } error = sysctl_out_proc(p, req, flags); PROC_LOCK_ASSERT(p, MA_NOTOWNED); diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 20995223b6d2..fb0d71f339f4 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1381,7 +1381,7 @@ int cr_canseeothergids(struct ucred *u1, struct ucred *u2) { int i, match; - + if (!see_other_gids) { match = 0; for (i = 0; i < u1->cr_ngroups; i++) { @@ -2227,7 +2227,7 @@ crsetgroups_locked(struct ucred *cr, int ngrp, gid_t *groups) int i; int j; gid_t g; - + KASSERT(cr->cr_agroups >= ngrp, ("cr_ngroups is too small")); bcopy(groups, cr->cr_groups, ngrp * sizeof(gid_t)); diff --git a/sys/kern/kern_racct.c b/sys/kern/kern_racct.c index 21da6049b603..2dc077ac0b62 100644 --- a/sys/kern/kern_racct.c +++ b/sys/kern/kern_racct.c @@ -528,7 +528,7 @@ racct_adjust_resource(struct racct *racct, int resource, ("%s: resource %d usage < 0", __func__, resource)); racct->r_resources[resource] = 0; } - + /* * There are some cases where the racct %cpu resource would grow * beyond 100% per core. For example in racct_proc_exit() we add diff --git a/sys/kern/kern_rctl.c b/sys/kern/kern_rctl.c index 8ec66bc64c0a..06b5053ea5eb 100644 --- a/sys/kern/kern_rctl.c +++ b/sys/kern/kern_rctl.c @@ -1063,16 +1063,16 @@ static void rctl_rule_free(void *context, int pending) { struct rctl_rule *rule; - + rule = (struct rctl_rule *)context; ASSERT_RACCT_ENABLED(); KASSERT(rule->rr_refcount == 0, ("rule->rr_refcount != 0")); - + /* * We don't need locking here; rule is guaranteed to be inaccessible. */ - + rctl_rule_release_subject(rule); uma_zfree(rctl_rule_zone, rule); } @@ -2021,7 +2021,7 @@ again: rulecnt--; } } - + LIST_FOREACH(link, &newuip->ui_racct->r_rule_links, rrl_next) { if (newlink == NULL) goto goaround; @@ -2208,35 +2208,35 @@ rctl_init(void) int sys_rctl_get_racct(struct thread *td, struct rctl_get_racct_args *uap) { - + return (ENOSYS); } int sys_rctl_get_rules(struct thread *td, struct rctl_get_rules_args *uap) { - + return (ENOSYS); } int sys_rctl_get_limits(struct thread *td, struct rctl_get_limits_args *uap) { - + return (ENOSYS); } int sys_rctl_add_rule(struct thread *td, struct rctl_add_rule_args *uap) { - + return (ENOSYS); } int sys_rctl_remove_rule(struct thread *td, struct rctl_remove_rule_args *uap) { - + return (ENOSYS); } diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index 17eb8e9b889a..c9e78bde0c82 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -105,7 +105,6 @@ kern_getpriority(struct thread *td, int which, int who) error = 0; low = PRIO_MAX + 1; switch (which) { - case PRIO_PROCESS: if (who == 0) low = td->td_proc->p_nice; @@ -691,7 +690,6 @@ kern_proc_setrlimit(struct thread *td, struct proc *p, u_int which, alimp = &newlim->pl_rlimit[which]; switch (which) { - case RLIMIT_CPU: if (limp->rlim_cur != RLIM_INFINITY && p->p_cpulimit == RLIM_INFINITY) diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c index ebd86bf1174d..3f6bbf816138 100644 --- a/sys/kern/kern_sendfile.c +++ b/sys/kern/kern_sendfile.c @@ -1313,7 +1313,7 @@ out: int sys_sendfile(struct thread *td, struct sendfile_args *uap) { - + return (sendfile(td, uap, 0)); } diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index d65532f5d50f..e508370a5749 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -2961,7 +2961,6 @@ issignal(struct thread *td) * to clear it from the pending mask. */ switch ((intptr_t)p->p_sigacts->ps_sigact[_SIG_IDX(sig)]) { - case (intptr_t)SIG_DFL: /* * Don't take default actions on system processes. diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index 72ddae3f3325..5814d147c19c 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -970,7 +970,6 @@ sysctl_sysctl_debug_dump_node(struct sysctl_oid_list *l, int i) SYSCTL_ASSERT_LOCKED(); SLIST_FOREACH(oidp, l, oid_link) { - for (k=0; k<i; k++) printf(" "); @@ -1007,7 +1006,6 @@ sysctl_sysctl_debug_dump_node(struct sysctl_oid_list *l, int i) case CTLTYPE_OPAQUE: printf(" Opaque/struct\n"); break; default: printf("\n"); } - } } diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index c13982380bdf..aa5ed4b708ec 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -1212,10 +1212,10 @@ kern_ktimer_create(struct thread *td, clockid_t clock_id, struct sigevent *evp, !_SIG_VALID(evp->sigev_signo)) return (EINVAL); } - + if (p->p_itimers == NULL) itimers_alloc(p); - + it = uma_zalloc(itimer_zone, M_WAITOK); it->it_flags = 0; it->it_usecount = 0; @@ -1491,7 +1491,7 @@ static int realtimer_delete(struct itimer *it) { mtx_assert(&it->it_mtx, MA_OWNED); - + /* * clear timer's value and interval to tell realtimer_expire * to not rearm the timer. @@ -1545,7 +1545,7 @@ realtimer_settime(struct itimer *it, int flags, } else { timespecclear(&val.it_interval); } - + if (ovalue != NULL) realtimer_gettime(it, ovalue); diff --git a/sys/kern/kern_timeout.c b/sys/kern/kern_timeout.c index 6091a3db2fa9..f804e279ec8b 100644 --- a/sys/kern/kern_timeout.c +++ b/sys/kern/kern_timeout.c @@ -654,7 +654,7 @@ softclock_call_cc(struct callout *c, struct callout_cpu *cc, c_arg = c->c_arg; c_iflags = c->c_iflags; c->c_iflags &= ~CALLOUT_PENDING; - + cc_exec_curr(cc, direct) = c; cc_exec_last_func(cc, direct) = c_func; cc_exec_last_arg(cc, direct) = c_arg; diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c index c170d4dbe29d..f95246f1cf38 100644 --- a/sys/kern/kern_xxx.c +++ b/sys/kern/kern_xxx.c @@ -173,7 +173,6 @@ ogetkerninfo(struct thread *td, struct ogetkerninfo_args *uap) u_int needed = 0; switch (uap->op & 0xff00) { - case KINFO_RT: name[0] = CTL_NET; name[1] = PF_ROUTE; diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index c48def1ddece..a9861884c2dc 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -213,7 +213,6 @@ elf_set_add(struct elf_set_head *list, Elf_Addr start, Elf_Addr stop, Elf_Addr b set->es_base = base; TAILQ_FOREACH(iter, list, es_link) { - KASSERT((set->es_start < iter->es_start && set->es_stop < iter->es_stop) || (set->es_start > iter->es_start && set->es_stop > iter->es_stop), ("linker sets intersection: to insert: 0x%jx-0x%jx; inserted: 0x%jx-0x%jx", diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index c9c091cbafa0..48fcf8337ee9 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -1457,7 +1457,7 @@ link_elf_each_function_name(linker_file_t file, elf_file_t ef = (elf_file_t)file; const Elf_Sym *symp; int i, error; - + /* Exhaustive search */ for (i = 0, symp = ef->ddbsymtab; i < ef->ddbsymcnt; i++, symp++) { if (symp->st_value != 0 && diff --git a/sys/kern/posix4_mib.c b/sys/kern/posix4_mib.c index 4a9634522ee0..718f0276a3fb 100644 --- a/sys/kern/posix4_mib.c +++ b/sys/kern/posix4_mib.c @@ -176,4 +176,3 @@ p31b_set_standard(void *dummy) SYSINIT(p31b_set_standard, SI_SUB_P1003_1B, SI_ORDER_ANY, p31b_set_standard, NULL); - diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index 07bd93a16398..880078497eb5 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -1262,7 +1262,7 @@ sched_pickcpu(struct thread *td) CPU_FOREACH(cpu) { if (!THREAD_CAN_SCHED(td, cpu)) continue; - + if (best == NOCPU) best = cpu; else if (runq_length[cpu] < runq_length[best]) @@ -1311,7 +1311,6 @@ sched_add(struct thread *td, int flags) td->td_lock = &sched_lock; else thread_lock_set(td, &sched_lock); - } TD_SET_RUNQ(td); @@ -1629,7 +1628,7 @@ sched_pctcpu_delta(struct thread *td) u_int sched_estcpu(struct thread *td) { - + return (td_get_sched(td)->ts_estcpu); } diff --git a/sys/kern/subr_blist.c b/sys/kern/subr_blist.c index 0479ebc99e5d..27b226fd8a18 100644 --- a/sys/kern/subr_blist.c +++ b/sys/kern/subr_blist.c @@ -650,7 +650,7 @@ blst_next_leaf_alloc(blmeta_t *scan, daddr_t start, int count, int maxcount) } } } - + /* * 'scan' is the last leaf that provides blocks. Clear from 1 to * BLIST_RADIX bits to represent the allocation of those last blocks. diff --git a/sys/kern/subr_bufring.c b/sys/kern/subr_bufring.c index 912c537b7596..490c7cfa2fb8 100644 --- a/sys/kern/subr_bufring.c +++ b/sys/kern/subr_bufring.c @@ -42,7 +42,7 @@ buf_ring_alloc(int count, struct malloc_type *type, int flags, struct mtx *lock) struct buf_ring *br; KASSERT(powerof2(count), ("buf ring must be size power of 2")); - + br = malloc(sizeof(struct buf_ring) + count*sizeof(caddr_t), type, flags|M_ZERO); if (br == NULL) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index b373bc38e131..19c056ab9974 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -169,7 +169,6 @@ static bool device_frozen; static int bus_debug = 1; SYSCTL_INT(_debug, OID_AUTO, bus_debug, CTLFLAG_RWTUN, &bus_debug, 0, "Bus debug level"); - #define PDEBUG(a) if (bus_debug) {printf("%s:%d: ", __func__, __LINE__), printf a; printf("\n");} #define DEVICENAME(d) ((d)? device_get_name(d): "no device") @@ -1921,7 +1920,7 @@ device_delete_child(device_t dev, device_t child) /* detach parent before deleting children, if any */ if ((error = device_detach(child)) != 0) return (error); - + /* remove children second */ while ((grandchild = TAILQ_FIRST(&child->children)) != NULL) { error = device_delete_child(child, grandchild); diff --git a/sys/kern/subr_busdma_bufalloc.c b/sys/kern/subr_busdma_bufalloc.c index 91445aa79950..fea141908399 100644 --- a/sys/kern/subr_busdma_bufalloc.c +++ b/sys/kern/subr_busdma_bufalloc.c @@ -171,4 +171,3 @@ busdma_bufalloc_free_uncacheable(void *item, vm_size_t size, uint8_t pflag) kmem_free((vm_offset_t)item, size); } - diff --git a/sys/kern/subr_counter.c b/sys/kern/subr_counter.c index fec51b6b635a..59ded19737bf 100644 --- a/sys/kern/subr_counter.c +++ b/sys/kern/subr_counter.c @@ -113,7 +113,7 @@ sysctl_handle_counter_u64_array(SYSCTL_HANDLER_ARGS) */ for (int i = 0; i < arg2; i++) counter_u64_zero(((counter_u64_t *)arg1)[i]); - + return (0); } diff --git a/sys/kern/subr_csan.c b/sys/kern/subr_csan.c index f93e914edbe0..feec30d3c600 100644 --- a/sys/kern/subr_csan.c +++ b/sys/kern/subr_csan.c @@ -878,4 +878,3 @@ CSAN_BUS_SET_FUNC(multi_stream, 8, uint64_t) CSAN_BUS_SET_FUNC(region_stream, 8, uint64_t) #endif #endif - diff --git a/sys/kern/subr_devmap.c b/sys/kern/subr_devmap.c index 5ed996b9c7c0..581e85086f0f 100644 --- a/sys/kern/subr_devmap.c +++ b/sys/kern/subr_devmap.c @@ -348,4 +348,3 @@ DB_SHOW_COMMAND(devmap, db_show_devmap) } #endif /* DDB */ - diff --git a/sys/kern/subr_filter.c b/sys/kern/subr_filter.c index 0ddb0ba005f4..9b36058e481c 100644 --- a/sys/kern/subr_filter.c +++ b/sys/kern/subr_filter.c @@ -76,7 +76,7 @@ setup_time_filter(struct time_filter *tf, int fil_type, uint32_t time_len) { uint64_t set_val; int i; - + /* * You must specify either a MIN or MAX filter, * though its up to the user to use the correct @@ -107,7 +107,7 @@ setup_time_filter_small(struct time_filter_small *tf, int fil_type, uint32_t tim { uint32_t set_val; int i; - + /* * You must specify either a MIN or MAX filter, * though its up to the user to use the correct @@ -333,7 +333,6 @@ tick_filter_clock(struct time_filter *tf, uint32_t now) tf->entries[i].value = tf->entries[(i+1)].value; tf->entries[i].time_up = tf->entries[(i+1)].time_up; } - } } @@ -365,7 +364,6 @@ tick_filter_clock_small(struct time_filter_small *tf, uint32_t now) tf->entries[i].value = tf->entries[(i+1)].value; tf->entries[i].time_up = tf->entries[(i+1)].time_up; } - } } @@ -373,7 +371,7 @@ uint32_t apply_filter_min(struct time_filter *tf, uint64_t value, uint32_t now) { int i, j; - + if (value <= tf->entries[0].value) { /* Zap them all */ for(i=0; i<NUM_FILTER_ENTRIES; i++) { @@ -400,7 +398,7 @@ apply_filter_min_small(struct time_filter_small *tf, uint32_t value, uint32_t now) { int i, j; - + if (value <= tf->entries[0].value) { /* Zap them all */ for(i=0; i<NUM_FILTER_ENTRIES; i++) { @@ -426,7 +424,7 @@ uint32_t apply_filter_max(struct time_filter *tf, uint64_t value, uint32_t now) { int i, j; - + if (value >= tf->entries[0].value) { /* Zap them all */ for(i=0; i<NUM_FILTER_ENTRIES; i++) { @@ -453,7 +451,7 @@ apply_filter_max_small(struct time_filter_small *tf, uint32_t value, uint32_t now) { int i, j; - + if (value >= tf->entries[0].value) { /* Zap them all */ for(i=0; i<NUM_FILTER_ENTRIES; i++) { diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c index 791a73957af5..325ae78e1615 100644 --- a/sys/kern/subr_intr.c +++ b/sys/kern/subr_intr.c @@ -936,7 +936,6 @@ intr_resolve_irq(device_t dev, intptr_t xref, struct intr_map_data *data, ("%s: Found a non-PIC controller: %s", __func__, device_get_name(pic->pic_dev))); return (PIC_MAP_INTR(pic->pic_dev, data, isrc)); - } } @@ -1318,7 +1317,6 @@ intr_alloc_msi(device_t pci, device_t child, intptr_t xref, int count, msi-> isrc = isrc[i]; irqs[i] = intr_map_irq(pic->pic_dev, xref, (struct intr_map_data *)msi); - } free(isrc, M_INTRNG); diff --git a/sys/kern/subr_kobj.c b/sys/kern/subr_kobj.c index cc54ebe1f254..d001450cba6f 100644 --- a/sys/kern/subr_kobj.c +++ b/sys/kern/subr_kobj.c @@ -253,7 +253,7 @@ kobj_class_free(kobj_class_t cls) ops = cls->ops; cls->ops = NULL; } - + KOBJ_UNLOCK(); if (ops) diff --git a/sys/kern/subr_lock.c b/sys/kern/subr_lock.c index 1889e55553ae..b69ee349482c 100644 --- a/sys/kern/subr_lock.c +++ b/sys/kern/subr_lock.c @@ -548,7 +548,6 @@ lock_profile_lookup(struct lock_object *lo, int spin, const char *file, if (lp->line == line && lp->file == p && lp->name == lo->lo_name) return (lp); - } lp = SLIST_FIRST(&type->lpt_lpalloc); if (lp == NULL) { diff --git a/sys/kern/subr_log.c b/sys/kern/subr_log.c index c542d3418276..9336611d6005 100644 --- a/sys/kern/subr_log.c +++ b/sys/kern/subr_log.c @@ -258,7 +258,6 @@ logioctl(struct cdev *dev, u_long com, caddr_t data, int flag, struct thread *td { switch (com) { - /* return number of characters immediately available */ case FIONREAD: *(int *)data = msgbuf_getcount(msgbufp); diff --git a/sys/kern/subr_mchain.c b/sys/kern/subr_mchain.c index 57461abda807..ca4d8e879997 100644 --- a/sys/kern/subr_mchain.c +++ b/sys/kern/subr_mchain.c @@ -473,7 +473,7 @@ md_get_mem(struct mdchain *mdp, caddr_t target, int size, int type) int error; u_int count; u_char *s; - + while (size > 0) { if (m == NULL) { MBERROR("incomplete copy\n"); diff --git a/sys/kern/subr_module.c b/sys/kern/subr_module.c index 883ba0a1948b..6ac5b507dba4 100644 --- a/sys/kern/subr_module.c +++ b/sys/kern/subr_module.c @@ -54,7 +54,6 @@ preload_search_by_name(const char *name) int next; if (preload_metadata != NULL) { - curp = preload_metadata; for (;;) { hdr = (uint32_t *)curp; @@ -86,7 +85,6 @@ preload_search_by_type(const char *type) int next; if (preload_metadata != NULL) { - curp = preload_metadata; lname = NULL; for (;;) { @@ -123,7 +121,6 @@ preload_search_next_name(caddr_t base) int next; if (preload_metadata != NULL) { - /* Pick up where we left off last time */ if (base) { /* skip to next field */ @@ -184,7 +181,7 @@ preload_search_info(caddr_t mod, int inf) if (hdr[0] == type) break; } - + /* * Attribute match? Return pointer to data. * Consumer may safely assume that size value precedes @@ -216,7 +213,6 @@ preload_delete_name(const char *name) sz = 0; if (preload_metadata != NULL) { - clearing = 0; curp = preload_metadata; for (;;) { @@ -284,7 +280,6 @@ preload_bootstrap_relocate(vm_offset_t offset) int next; if (preload_metadata != NULL) { - curp = preload_metadata; for (;;) { hdr = (uint32_t *)curp; diff --git a/sys/kern/subr_msgbuf.c b/sys/kern/subr_msgbuf.c index 680fbbb81459..980d37df205b 100644 --- a/sys/kern/subr_msgbuf.c +++ b/sys/kern/subr_msgbuf.c @@ -218,7 +218,6 @@ msgbuf_addstr(struct msgbuf *mbp, int pri, const char *str, int filter_cr) * insert a newline before this string. */ if (mbp->msg_lastpri != pri && (mbp->msg_flags & MSGBUF_NEEDNL) != 0) { - msgbuf_do_addchar(mbp, &seq, '\n'); mbp->msg_flags &= ~MSGBUF_NEEDNL; } @@ -239,7 +238,6 @@ msgbuf_addstr(struct msgbuf *mbp, int pri, const char *str, int filter_cr) if (msgbuf_show_timestamp && needtime == 1 && (mbp->msg_flags & MSGBUF_NEEDNL) == 0) { - snprintf(buf, sizeof(buf), "[%jd] ", (intmax_t)time_uptime); for (j = 0; buf[j] != '\0'; j++) diff --git a/sys/kern/subr_power.c b/sys/kern/subr_power.c index 2b9e02b820ac..c6ab5ee39bd8 100644 --- a/sys/kern/subr_power.c +++ b/sys/kern/subr_power.c @@ -121,4 +121,3 @@ power_profile_set_state(int state) if (changed) EVENTHANDLER_INVOKE(power_profile_change, 0); } - diff --git a/sys/kern/subr_scanf.c b/sys/kern/subr_scanf.c index 140b4edbc230..68389ed6a444 100644 --- a/sys/kern/subr_scanf.c +++ b/sys/kern/subr_scanf.c @@ -97,7 +97,7 @@ sscanf(const char *ibuf, const char *fmt, ...) { va_list ap; int ret; - + va_start(ap, fmt); ret = vsscanf(ibuf, fmt, ap); va_end(ap); @@ -128,7 +128,7 @@ vsscanf(const char *inp, char const *fmt0, va_list ap) { 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; inr = strlen(inp); - + nassigned = 0; nconversions = 0; nread = 0; @@ -309,7 +309,6 @@ literal: * Do the conversion. */ switch (c) { - case CT_CHAR: /* scan arbitrary characters (sets NOSKIP) */ if (width == 0) @@ -434,7 +433,6 @@ literal: * if we accept it as a part of number. */ switch (c) { - /* * The digit 0 is always legal, but is * special. For %i conversions, if no @@ -565,7 +563,6 @@ literal: nread += p - buf; nconversions++; break; - } } input_failure: @@ -613,7 +610,6 @@ __sccl(char *tab, const u_char *fmt) doswitch: n = *fmt++; /* and examine the next */ switch (n) { - case 0: /* format ended too soon */ return (fmt - 1); @@ -665,4 +661,3 @@ doswitch: } /* NOTREACHED */ } - diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c index 411b2280b30b..9da7ea869f86 100644 --- a/sys/kern/subr_smp.c +++ b/sys/kern/subr_smp.c @@ -493,7 +493,7 @@ smp_rendezvous_action(void) #ifdef INVARIANTS owepreempt = td->td_owepreempt; #endif - + /* * If requested, run a setup function before the main action * function. Ensure all CPUs have completed the setup @@ -720,7 +720,7 @@ smp_topo_none(void) top->cg_children = 0; top->cg_level = CG_SHARE_NONE; top->cg_flags = 0; - + return (top); } @@ -1302,4 +1302,3 @@ topo_analyze(struct topo_node *topo_root, int all, } #endif /* SMP */ - diff --git a/sys/kern/subr_terminal.c b/sys/kern/subr_terminal.c index 6c49c68f24e6..fad2a4872a73 100644 --- a/sys/kern/subr_terminal.c +++ b/sys/kern/subr_terminal.c @@ -192,7 +192,7 @@ terminal_init(struct terminal *tm) default_message.ta_bgcolor |= TC_LIGHT; kernel_message.ta_bgcolor |= TC_LIGHT; } - + if (default_message.ta_bgcolor == TC_BLACK && default_message.ta_fgcolor < TC_NCOLORS) kernel_message.ta_fgcolor |= TC_LIGHT; diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index 01d265277ba1..2c8f2909f2b3 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.c @@ -342,7 +342,6 @@ turnstile_adjust_thread(struct turnstile *ts, struct thread *td) td2 = TAILQ_NEXT(td, td_lockq); if ((td1 != NULL && td->td_priority < td1->td_priority) || (td2 != NULL && td->td_priority > td2->td_priority)) { - /* * Remove thread from blocked chain and determine where * it should be moved to. @@ -872,7 +871,7 @@ turnstile_signal(struct turnstile *ts, int queue) return (empty); } - + /* * Put all blocked threads on the pending list. This must be called with * the turnstile chain locked. @@ -1160,7 +1159,7 @@ found: print_queue(&ts->ts_blocked[TS_EXCLUSIVE_QUEUE], "Exclusive Waiters", "\t"); print_queue(&ts->ts_pending, "Pending Threads", "\t"); - + } /* @@ -1267,7 +1266,7 @@ DB_SHOW_ALL_COMMAND(chains, db_show_allchains) DB_SHOW_ALIAS(allchains, db_show_allchains) static void print_waiters(struct turnstile *ts, int indent); - + static void print_waiter(struct thread *td, int indent) { diff --git a/sys/kern/subr_uio.c b/sys/kern/subr_uio.c index 86ef10361c68..a7b7988cf661 100644 --- a/sys/kern/subr_uio.c +++ b/sys/kern/subr_uio.c @@ -247,7 +247,6 @@ uiomove_faultflag(void *cp, int n, struct uio *uio, int nofault) cnt = n; switch (uio->uio_segflg) { - case UIO_USERSPACE: maybe_yield(); if (uio->uio_rw == UIO_READ) @@ -324,7 +323,6 @@ again: goto again; } switch (uio->uio_segflg) { - case UIO_USERSPACE: if (subyte(iov->iov_base, c) < 0) return (EFAULT); diff --git a/sys/kern/subr_unit.c b/sys/kern/subr_unit.c index bad30c0811c3..7b4e22e1f27a 100644 --- a/sys/kern/subr_unit.c +++ b/sys/kern/subr_unit.c @@ -1041,7 +1041,6 @@ main(int argc, char **argv) usage(argv); exit(2); } - } setbuf(stdout, NULL); diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index 895e51b0ed30..7e21db5d7c91 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -959,7 +959,6 @@ witness_ddb_compute_levels(void) * Look for locks with no parents and level all their descendants. */ STAILQ_FOREACH(w, &w_all, w_list) { - /* If the witness has ancestors (is not a root), skip it. */ if (w->w_num_ancestors > 0) continue; @@ -1032,7 +1031,7 @@ witness_ddb_display_list(int(*prnt)(const char *fmt, ...), return; } } - + static void witness_ddb_display(int(*prnt)(const char *fmt, ...)) { @@ -1053,7 +1052,7 @@ witness_ddb_display(int(*prnt)(const char *fmt, ...)) witness_ddb_display_list(prnt, &w_sleep); if (db_pager_quit) return; - + /* * Now do spin locks which have been acquired at least once. */ @@ -1061,7 +1060,7 @@ witness_ddb_display(int(*prnt)(const char *fmt, ...)) witness_ddb_display_list(prnt, &w_spin); if (db_pager_quit) return; - + /* * Finally, any locks which have not been acquired yet. */ @@ -1101,7 +1100,7 @@ witness_defineorder(struct lock_object *lock1, struct lock_object *lock2) mtx_unlock_spin(&w_mtx); return (EDOOFUS); } - + /* Try to add the new order. */ CTR3(KTR_WITNESS, "%s: adding %s as a child of %s", __func__, lock2->lo_witness->w_name, lock1->lo_witness->w_name); @@ -1130,7 +1129,6 @@ witness_checkorder(struct lock_object *lock, int flags, const char *file, td = curthread; if (class->lc_flags & LC_SLEEPLOCK) { - /* * Since spin locks include a critical section, this check * implicitly enforces a lock order of all sleep locks before @@ -1150,7 +1148,6 @@ witness_checkorder(struct lock_object *lock, int flags, const char *file, if (lock_list == NULL || lock_list->ll_count == 0) return; } else { - /* * If this is the first lock, just return as no order * checking is needed. Avoid problems with thread @@ -1230,7 +1227,7 @@ witness_checkorder(struct lock_object *lock, int flags, const char *file, plock = &lle->ll_children[lle->ll_count - 1]; } } - + /* * Try to perform most checks without a lock. If this succeeds we * can skip acquiring the lock and return success. Otherwise we redo @@ -2013,7 +2010,6 @@ adopt(struct witness *parent, struct witness *child) /* Find each descendant of 'i' and mark it as a descendant. */ for (j = 1; j <= w_max_used_index; j++) { - /* * Skip children that are already marked as * descendants of 'i'. @@ -2498,7 +2494,6 @@ witness_assert(const struct lock_object *lock, int flags, const char *file, default: kassert_panic("Invalid lock assertion at %s:%d.", fixup_filename(file), line); - } #endif /* INVARIANT_SUPPORT */ } @@ -2979,7 +2974,7 @@ witness_hash_get(const char *key) { struct witness *w; uint32_t hash; - + MPASS(key != NULL); if (witness_cold == 0) mtx_assert(&w_mtx, MA_OWNED); @@ -3068,7 +3063,7 @@ witness_lock_order_add(struct witness *parent, struct witness *child) struct witness_lock_order_data *data = NULL; struct witness_lock_order_key key; unsigned int hash; - + MPASS(parent != NULL && child != NULL); key.from = parent->w_index; key.to = child->w_index; diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 1091f0c45819..fa66490969c4 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -1104,7 +1104,7 @@ kern_select(struct thread *td, int nd, fd_set *fd_in, fd_set *fd_ou, swizzle_fdset(ibits[0]); swizzle_fdset(ibits[1]); swizzle_fdset(ibits[2]); - + if (nbufbytes != 0) bzero(selbits, nbufbytes / 2); diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index ad390e0a0c98..239cf3bbdfb4 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -1357,7 +1357,6 @@ pipe_ioctl(struct file *fp, u_long cmd, void *data, struct ucred *active_cred, error = 0; switch (cmd) { - case FIONBIO: break; diff --git a/sys/kern/sys_socket.c b/sys/kern/sys_socket.c index 37ce4f17e911..c8d0dd4f331b 100644 --- a/sys/kern/sys_socket.c +++ b/sys/kern/sys_socket.c @@ -310,7 +310,7 @@ soo_stat(struct file *fp, struct stat *ub, struct ucred *active_cred, ub->st_mode |= S_IRUSR | S_IRGRP | S_IROTH; ub->st_size = sbavail(sb) - sb->sb_ctl; SOCKBUF_UNLOCK(sb); - + sb = &so->so_snd; SOCKBUF_LOCK(sb); if ((sb->sb_state & SBS_CANTSENDMORE) == 0) diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c index aab4551357c2..098bba612636 100644 --- a/sys/kern/sysv_msg.c +++ b/sys/kern/sysv_msg.c @@ -546,7 +546,6 @@ kern_msgctl(struct thread *td, int msqid, int cmd, struct msqid_ds *msqbuf) rval = 0; switch (cmd) { - case IPC_RMID: { #ifdef MAC diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index 5064c7519228..df006ff533ba 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -2140,4 +2140,3 @@ SYSCTL_PROC(_kern_ipc, OID_AUTO, mbufprofileclr, mbprof_clr_handler, "I", "clear mbuf profiling statistics"); #endif - diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index 29452882d86b..faf8f4ed25c8 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -907,7 +907,7 @@ mqfs_lookupx(struct vop_cachedlookup_args *ap) if (pn != NULL) mqnode_addref(pn); sx_xunlock(&mqfs->mi_lock); - + /* found */ if (pn != NULL) { /* DELETE */ @@ -932,7 +932,7 @@ mqfs_lookupx(struct vop_cachedlookup_args *ap) cache_enter(dvp, *vpp, cnp); return (error); } - + /* not found */ /* will create a new entry in the directory ? */ @@ -1916,7 +1916,7 @@ static int _mqueue_recv(struct mqueue *mq, struct mqueue_msg **msg, int timo) { int error = 0; - + mtx_lock(&mq->mq_mutex); while ((*msg = TAILQ_FIRST(&mq->mq_msgq)) == NULL && error == 0) { if (timo < 0) { @@ -2447,7 +2447,7 @@ mqueue_fdclose(struct thread *td, int fd, struct file *fp) struct mqueue *mq; #ifdef INVARIANTS struct filedesc *fdp; - + fdp = td->td_proc->p_fd; FILEDESC_LOCK_ASSERT(fdp); #endif diff --git a/sys/kern/uipc_sem.c b/sys/kern/uipc_sem.c index 4d7c8ff03773..3edf01a25d89 100644 --- a/sys/kern/uipc_sem.c +++ b/sys/kern/uipc_sem.c @@ -176,7 +176,7 @@ ksem_stat(struct file *fp, struct stat *sb, struct ucred *active_cred, if (error) return (error); #endif - + /* * Attempt to return sanish values for fstat() on a semaphore * file descriptor. diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index 74fc9b023b09..1c839ba02bda 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -415,7 +415,7 @@ shm_stat(struct file *fp, struct stat *sb, struct ucred *active_cred, if (error) return (error); #endif - + /* * Attempt to return sanish values for fstat() on a memory file * descriptor. @@ -1203,7 +1203,7 @@ shm_mmap(struct file *fp, vm_map_t map, vm_offset_t *addr, vm_size_t objsize, if (error != 0) goto out; #endif - + mtx_lock(&shm_timestamp_lock); vfs_timestamp(&shmfd->shm_atime); mtx_unlock(&shm_timestamp_lock); diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index 7a364ba3d5d2..3835bd5f6a25 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -599,7 +599,7 @@ sysctl_handle_sb_max(SYSCTL_HANDLER_ARGS) sb_max_adj = (u_quad_t)sb_max * MCLBYTES / (MSIZE + MCLBYTES); return (0); } - + /* * Allot mbufs to a sockbuf. Attempt to scale mbmax so that mbcnt doesn't * become limiting if buffering efficiency is near the normal case. diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 359546b19f65..77ca888d30f0 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -290,7 +290,7 @@ socket_zone_change(void *tag) static void socket_hhook_register(int subtype) { - + if (hhook_head_register(HHOOK_TYPE_SOCKET, subtype, &V_socket_hhh[subtype], HHOOK_NOWAIT|HHOOK_HEADISINVNET) != 0) @@ -300,7 +300,7 @@ socket_hhook_register(int subtype) static void socket_hhook_deregister(int subtype) { - + if (hhook_head_deregister(V_socket_hhh[subtype]) != 0) printf("%s: WARNING: unable to deregister hook\n", __func__); } diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 6261135f64ad..1d4639e02d0e 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -2275,7 +2275,6 @@ unp_internalize(struct mbuf **controlp, struct thread *td) error = EOPNOTSUPP; goto out; } - } /* @@ -2648,7 +2647,6 @@ unp_gc(__unused void *arg, int pending) for (head = heads; *head != NULL; head++) LIST_FOREACH(unp, *head, unp_link) { - KASSERT((unp->unp_gcflag & ~UNPGC_IGNORE_RIGHTS) == 0, ("%s: unp %p has unexpected gc flags 0x%x", __func__, unp, (unsigned int)unp->unp_gcflag)); diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index 9ff8628e9b10..e7294dc90503 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -3163,7 +3163,6 @@ vfs_bio_awrite(struct buf *bp) if ((vp->v_type == VREG) && (vp->v_mount != 0) && /* Only on nodes that have the size info */ (bp->b_flags & (B_CLUSTEROK | B_INVAL)) == B_CLUSTEROK) { - size = vp->v_mount->mnt_stat.f_iosize; maxcl = MAXPHYS / size; diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index 1dfdbcf67764..024011de4c89 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -541,4 +541,3 @@ vfs_stdcheckexp(struct mount *mp, struct sockaddr *nam, uint64_t *extflagsp, lockmgr(&mp->mnt_explock, LK_RELEASE, NULL); return (0); } - diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 492741538478..248e043c6527 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -2625,7 +2625,6 @@ sched_sync(void) wdog_kern_pat(WD_LASTVAL); mtx_lock(&sync_mtx); } - } if (syncer_state == SYNCER_FINAL_DELAY && syncer_final_iter > 0) syncer_final_iter--; |
