From 3ff65f71cb34a10c4e29b3c17b1ed35c40d7617c Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Thu, 30 Jan 2020 20:05:05 +0000 Subject: [PATCH] Remove duplicated empty lines from kern/*.c No functional changes. --- sys/kern/imgact_binmisc.c | 2 -- sys/kern/imgact_elf.c | 1 - sys/kern/init_main.c | 1 - sys/kern/kern_alq.c | 3 --- sys/kern/kern_conf.c | 2 -- sys/kern/kern_exit.c | 2 -- sys/kern/kern_hhook.c | 1 - sys/kern/kern_jail.c | 6 ------ sys/kern/kern_kcov.c | 1 - sys/kern/kern_kthread.c | 1 - sys/kern/kern_linker.c | 1 - sys/kern/kern_lockf.c | 1 - sys/kern/kern_mib.c | 1 - sys/kern/kern_mtxpool.c | 1 - sys/kern/kern_pmc.c | 1 - sys/kern/kern_poll.c | 2 -- sys/kern/kern_resource.c | 1 - sys/kern/kern_sig.c | 3 --- sys/kern/kern_switch.c | 1 - sys/kern/kern_sysctl.c | 3 --- sys/kern/kern_tc.c | 1 - sys/kern/kern_time.c | 1 - sys/kern/kern_ubsan.c | 1 - sys/kern/kern_umtx.c | 2 -- sys/kern/link_elf.c | 1 - sys/kern/link_elf_obj.c | 2 -- sys/kern/sched_4bsd.c | 2 -- sys/kern/sched_ule.c | 1 - sys/kern/subr_acl_posix1e.c | 1 - sys/kern/subr_blist.c | 1 - sys/kern/subr_bufring.c | 2 -- sys/kern/subr_bus.c | 2 -- sys/kern/subr_clock.c | 1 - sys/kern/subr_csan.c | 3 --- sys/kern/subr_fattime.c | 1 - sys/kern/subr_filter.c | 6 ------ sys/kern/subr_gtaskqueue.c | 3 --- sys/kern/subr_hints.c | 2 -- sys/kern/subr_intr.c | 4 ---- sys/kern/subr_kdb.c | 1 - sys/kern/subr_sbuf.c | 1 - sys/kern/subr_sleepqueue.c | 1 - sys/kern/subr_smp.c | 2 -- sys/kern/subr_stats.c | 1 - sys/kern/subr_unit.c | 4 ---- sys/kern/subr_vmem.c | 1 - sys/kern/subr_witness.c | 3 --- sys/kern/sys_generic.c | 1 - sys/kern/sys_pipe.c | 1 - sys/kern/sys_process.c | 1 - sys/kern/sysv_msg.c | 2 -- sys/kern/sysv_shm.c | 2 -- sys/kern/uipc_mbuf.c | 1 - sys/kern/uipc_usrreq.c | 4 ---- sys/kern/vfs_acl.c | 1 - sys/kern/vfs_bio.c | 2 -- sys/kern/vfs_cluster.c | 1 - sys/kern/vfs_extattr.c | 1 - sys/kern/vfs_init.c | 1 - sys/kern/vfs_subr.c | 2 -- sys/kern/vfs_syscalls.c | 1 - sys/kern/vfs_vnops.c | 4 ---- 62 files changed, 111 deletions(-) diff --git a/sys/kern/imgact_binmisc.c b/sys/kern/imgact_binmisc.c index 04fecc67de13..afb1184f22ec 100644 --- a/sys/kern/imgact_binmisc.c +++ b/sys/kern/imgact_binmisc.c @@ -609,7 +609,6 @@ imgact_binmisc_exec(struct image_params *imgp) fname = sbuf_data(sname); } - /* * We need to "push" the interpreter in the arg[] list. To do this, * we first shift all the other values in the `begin_argv' area to @@ -707,7 +706,6 @@ imgact_binmisc_exec(struct image_params *imgp) if (!error) imgp->interpreter_name = imgp->args->begin_argv; - done: if (sname) sbuf_delete(sname); diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 103f49d7d24a..b59f8c85ea1b 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -630,7 +630,6 @@ __elfN(load_section)(struct image_params *imgp, vm_ooffset_t offset, return (0); } - /* * We have to get the remaining bit of the file into the first part * of the oversized map segment. This is normally because the .data diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c index b2df117d1115..0d3434022e1f 100644 --- a/sys/kern/init_main.c +++ b/sys/kern/init_main.c @@ -115,7 +115,6 @@ linux_alloc_current_noop(struct thread *td __unused, int flags __unused) } int (*lkpi_alloc_current)(struct thread *, int) = linux_alloc_current_noop; - #ifndef BOOTHOWTO #define BOOTHOWTO 0 #endif diff --git a/sys/kern/kern_alq.c b/sys/kern/kern_alq.c index ec5a2fc9ec12..cbcabecd0a2d 100644 --- a/sys/kern/kern_alq.c +++ b/sys/kern/kern_alq.c @@ -120,7 +120,6 @@ static void alq_shutdown(struct alq *); static void alq_destroy(struct alq *); static int alq_doio(struct alq *); - /* * Add a new queue to the global list. Fail if we're shutting down. */ @@ -422,7 +421,6 @@ static struct kproc_desc ald_kp = { SYSINIT(aldthread, SI_SUB_KTHREAD_IDLE, SI_ORDER_ANY, kproc_start, &ald_kp); SYSINIT(ald, SI_SUB_LOCK, SI_ORDER_ANY, ald_startup, NULL); - /* User visible queue functions */ /* @@ -502,7 +500,6 @@ alq_open(struct alq **alqp, const char *file, struct ucred *cred, int cmode, return (ret); } - /* * Copy a new entry into the queue. If the operation would block either * wait or return an error depending on the value of waitok. diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index df22829a9abc..cbaf992052a8 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -950,7 +950,6 @@ dev_dependsl(struct cdev *pdev, struct cdev *cdev) LIST_INSERT_HEAD(&pdev->si_children, cdev, si_siblings); } - void dev_depends(struct cdev *pdev, struct cdev *cdev) { @@ -1325,7 +1324,6 @@ clone_create(struct clonedevs **cdp, struct cdevsw *csw, int *up, KASSERT(csw->d_flags & D_NEEDMINOR, ("clone_create() on cdevsw without minor numbers")); - /* * Search the list for a lot of things in one go: * A preexisting match is returned immediately. diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index 0ff332632d63..54584a10cddf 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -686,7 +686,6 @@ exit1(struct thread *td, int rval, int signo) thread_exit(); } - #ifndef _SYS_SYSPROTO_H_ struct abort2_args { char *why; @@ -763,7 +762,6 @@ out: return (0); } - #ifdef COMPAT_43 /* * The dirty work is handled by kern_wait(). diff --git a/sys/kern/kern_hhook.c b/sys/kern/kern_hhook.c index 334de1f2ac7b..fa30802664ac 100644 --- a/sys/kern/kern_hhook.c +++ b/sys/kern/kern_hhook.c @@ -508,7 +508,6 @@ hhook_vnet_uninit(const void *unused __unused) HHHLIST_UNLOCK(); } - /* * When a vnet is created and being initialised, init the V_hhook_vhead_list. */ diff --git a/sys/kern/kern_jail.c b/sys/kern/kern_jail.c index 146cf5a4ae17..c61d7a9e20e2 100644 --- a/sys/kern/kern_jail.c +++ b/sys/kern/kern_jail.c @@ -436,7 +436,6 @@ kern_jail(struct thread *td, struct jail *j) return (error); } - /* * struct jail_set_args { * struct iovec *iovp; @@ -1896,7 +1895,6 @@ kern_jail_set(struct thread *td, struct uio *optuio, int flags) return (error); } - /* * struct jail_get_args { * struct iovec *iovp; @@ -2208,7 +2206,6 @@ kern_jail_get(struct thread *td, struct uio *optuio, int flags) return (error); } - /* * struct jail_remove_args { * int jid; @@ -2308,7 +2305,6 @@ prison_remove_one(struct prison *pr) prison_deref(pr, deuref | PD_DEREF); } - /* * struct jail_attach_args { * int jid; @@ -2425,7 +2421,6 @@ do_jail_attach(struct thread *td, struct prison *pr) return (error); } - /* * Returns a locked prison instance, or NULL on failure. */ @@ -3427,7 +3422,6 @@ prison_path(struct prison *pr1, struct prison *pr2) return (path2); } - /* * Jail-related sysctls. */ diff --git a/sys/kern/kern_kcov.c b/sys/kern/kern_kcov.c index 1e9ed224f17e..3679a3be1e4d 100644 --- a/sys/kern/kern_kcov.c +++ b/sys/kern/kern_kcov.c @@ -321,7 +321,6 @@ kcov_close(struct cdev *dev, int fflag, int devtype, struct thread *td) struct kcov_info *info; int error; - if ((error = devfs_get_cdevpriv((void **)&info)) != 0) return (error); diff --git a/sys/kern/kern_kthread.c b/sys/kern/kern_kthread.c index d2c7b3c8f1ed..939bd689269b 100644 --- a/sys/kern/kern_kthread.c +++ b/sys/kern/kern_kthread.c @@ -230,7 +230,6 @@ kproc_suspend_check(struct proc *p) PROC_UNLOCK(p); } - /* * Start a kernel thread. * diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c index a5dcd87f1c4a..45ebc4beb7b3 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -133,7 +133,6 @@ retry: \ (a) = next_file_id; \ } while(0) - /* XXX wrong name; we're looking at version provision tags here, not modules */ typedef TAILQ_HEAD(, modlist) modlisthead_t; struct modlist { diff --git a/sys/kern/kern_lockf.c b/sys/kern/kern_lockf.c index 57c816346b24..e6f7cc4eba4b 100644 --- a/sys/kern/kern_lockf.c +++ b/sys/kern/kern_lockf.c @@ -886,7 +886,6 @@ lf_free_edge(struct lockf_edge *e) free(e, M_LOCKF); } - /* * Ensure that the lock's owner has a corresponding vertex in the * owner graph. diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c index daf452f6cc9a..dccaa754805d 100644 --- a/sys/kern/kern_mib.c +++ b/sys/kern/kern_mib.c @@ -518,7 +518,6 @@ sysctl_build_id(SYSCTL_HANDLER_ARGS) return (ENOENT); } - hashlen = sectionlen - BUILD_ID_HEADER_LEN; for (int i = 0; i < hashlen; i++) { uint8_t c = __build_id_start[i+BUILD_ID_HEADER_LEN]; diff --git a/sys/kern/kern_mtxpool.c b/sys/kern/kern_mtxpool.c index e11a30391627..92cfeb5bd131 100644 --- a/sys/kern/kern_mtxpool.c +++ b/sys/kern/kern_mtxpool.c @@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$"); #include #include - static MALLOC_DEFINE(M_MTXPOOL, "mtx_pool", "mutex pool"); /* Pool sizes must be a power of two */ diff --git a/sys/kern/kern_pmc.c b/sys/kern/kern_pmc.c index 4b73f134b2d4..6d6064e40aeb 100644 --- a/sys/kern/kern_pmc.c +++ b/sys/kern/kern_pmc.c @@ -183,7 +183,6 @@ pmc_cpu_is_primary(int cpu) #endif } - /* * Return the maximum CPU number supported by the system. The return * value is used for scaling internal data structures and for runtime diff --git a/sys/kern/kern_poll.c b/sys/kern/kern_poll.c index 3663b7d3df2f..783993f0e9f1 100644 --- a/sys/kern/kern_poll.c +++ b/sys/kern/kern_poll.c @@ -247,7 +247,6 @@ static uint32_t idlepoll_sleeping; /* idlepoll is sleeping */ SYSCTL_UINT(_kern_polling, OID_AUTO, idlepoll_sleeping, CTLFLAG_RD, &idlepoll_sleeping, 0, "idlepoll is sleeping"); - #define POLL_LIST_LEN 128 struct pollrec { poll_handler_t *handler; @@ -273,7 +272,6 @@ init_device_poll(void) } SYSINIT(device_poll, SI_SUB_SOFTINTR, SI_ORDER_MIDDLE, init_device_poll, NULL); - /* * Hook from hardclock. Tries to schedule a netisr, but keeps track * of lost ticks due to the previous handler taking too long. diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index 852524810709..17eb8e9b889a 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -66,7 +66,6 @@ __FBSDID("$FreeBSD$"); #include #include - static MALLOC_DEFINE(M_PLIMIT, "plimit", "plimit structures"); static MALLOC_DEFINE(M_UIDINFO, "uidinfo", "uidinfo structures"); #define UIHASH(uid) (&uihashtbl[(uid) & uihash]) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 46161ae70044..961da27ba7d0 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -865,7 +865,6 @@ freebsd4_sigaction(struct thread *td, struct freebsd4_sigaction_args *uap) struct sigaction *actp, *oactp; int error; - actp = (uap->act != NULL) ? &act : NULL; oactp = (uap->oact != NULL) ? &oact : NULL; if (actp) { @@ -1964,7 +1963,6 @@ pgsignal(struct pgrp *pgrp, int sig, int checkctty, ksiginfo_t *ksi) } } - /* * Recalculate the signal mask and reset the signal disposition after * usermode frame for delivery is formed. Should be called after @@ -1987,7 +1985,6 @@ postsig_done(int sig, struct thread *td, struct sigacts *ps) sigdflt(ps, sig); } - /* * Send a signal caused by a trap to the current thread. If it will be * caught immediately, deliver it with correct code. Otherwise, post it diff --git a/sys/kern/kern_switch.c b/sys/kern/kern_switch.c index 234b88ce796b..59de3ea69fba 100644 --- a/sys/kern/kern_switch.c +++ b/sys/kern/kern_switch.c @@ -26,7 +26,6 @@ * SUCH DAMAGE. */ - #include __FBSDID("$FreeBSD$"); diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index bda8fdd6a3a0..43bbe921314c 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -737,7 +737,6 @@ sysctl_remove_name(struct sysctl_oid *parent, const char *name, return (error); } - static int sysctl_remove_oid_locked(struct sysctl_oid *oidp, int del, int recurse) { @@ -1293,7 +1292,6 @@ sysctl_sysctl_oidfmt(SYSCTL_HANDLER_ARGS) return (error); } - static SYSCTL_NODE(_sysctl, CTL_SYSCTL_OIDFMT, oidfmt, CTLFLAG_RD | CTLFLAG_MPSAFE | CTLFLAG_CAPRD, sysctl_sysctl_oidfmt, ""); @@ -1546,7 +1544,6 @@ sysctl_msec_to_ticks(SYSCTL_HANDLER_ARGS) return (0); } - /* * Handle a long, signed or unsigned. * Two cases: diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index 9920a9a93048..75ea0d373341 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -1540,7 +1540,6 @@ SYSCTL_PROC(_kern_timecounter, OID_AUTO, hardware, CTLTYPE_STRING | CTLFLAG_RW, 0, 0, sysctl_kern_timecounter_hardware, "A", "Timecounter hardware selected"); - /* Report the available timecounter hardware. */ static int sysctl_kern_timecounter_choice(SYSCTL_HANDLER_ARGS) diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 1ab2ebcefefe..98db5e7fb006 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -118,7 +118,6 @@ int itimespecfix(struct timespec *ts); SYSINIT(posix_timer, SI_SUB_P1003_1B, SI_ORDER_FIRST+4, itimer_start, NULL); - static int settime(struct thread *td, struct timeval *tv) { diff --git a/sys/kern/kern_ubsan.c b/sys/kern/kern_ubsan.c index e94d7004072a..93d39103929c 100644 --- a/sys/kern/kern_ubsan.c +++ b/sys/kern/kern_ubsan.c @@ -26,7 +26,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ - /* * The micro UBSan implementation for the userland (uUBSan) and kernel (kUBSan). * The uBSSan versions is suitable for inclusion into libc or used standalone diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index 7ecf8e264058..1eaeae7e5558 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -715,7 +715,6 @@ umtxq_signal_queue(struct umtx_key *key, int n_wake, int q) return (ret); } - /* * Wake up specified thread. */ @@ -1578,7 +1577,6 @@ umtx_pi_setowner(struct umtx_pi *pi, struct thread *owner) TAILQ_INSERT_TAIL(&uq_owner->uq_pi_contested, pi, pi_link); } - /* * Disown a PI mutex, and remove it from the owned list. */ diff --git a/sys/kern/link_elf.c b/sys/kern/link_elf.c index abfbd910a2d7..03f9ae63d9ac 100644 --- a/sys/kern/link_elf.c +++ b/sys/kern/link_elf.c @@ -1314,7 +1314,6 @@ elf_relocaddr(linker_file_t lf, Elf_Addr x) return (x); } - static void link_elf_unload_file(linker_file_t file) { diff --git a/sys/kern/link_elf_obj.c b/sys/kern/link_elf_obj.c index 53f85ce3a5e1..c9c091cbafa0 100644 --- a/sys/kern/link_elf_obj.c +++ b/sys/kern/link_elf_obj.c @@ -87,7 +87,6 @@ typedef struct { int sec; } Elf_relaent; - typedef struct elf_file { struct linker_file lf; /* Common fields */ @@ -1270,7 +1269,6 @@ relocate_file(elf_file_t ef) Elf_Size symidx; Elf_Addr base; - /* Perform relocations without addend if there are any: */ for (i = 0; i < ef->nreltab; i++) { rel = ef->reltab[i].rel; diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index d28c484367d0..632a64c6a9ea 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -828,7 +828,6 @@ static void sched_priority(struct thread *td, u_char prio) { - KTR_POINT3(KTR_SCHED, "thread", sched_tdname(td), "priority change", "prio:%d", td->td_priority, "new prio:%d", prio, KTR_ATTR_LINKED, sched_tdname(curthread)); @@ -1298,7 +1297,6 @@ sched_add(struct thread *td, int flags) SDT_PROBE4(sched, , , enqueue, td, td->td_proc, NULL, flags & SRQ_PREEMPTED); - /* * Now that the thread is moving to the run-queue, set the lock * to the scheduler's lock. diff --git a/sys/kern/sched_ule.c b/sys/kern/sched_ule.c index 7dc48a2336bf..e2adf98ec6fd 100644 --- a/sys/kern/sched_ule.c +++ b/sys/kern/sched_ule.c @@ -1506,7 +1506,6 @@ sched_initticks(void *dummy) sched_idlespinthresh = 2 * max(10000, 6 * hz) / realstathz; } - /* * This is the core of the interactivity algorithm. Determines a score based * on past behavior. It is the ratio of sleep time to run time scaled to diff --git a/sys/kern/subr_acl_posix1e.c b/sys/kern/subr_acl_posix1e.c index 9038065b6a93..5fd0aeefbc33 100644 --- a/sys/kern/subr_acl_posix1e.c +++ b/sys/kern/subr_acl_posix1e.c @@ -652,7 +652,6 @@ acl_posix1e_newfilemode(mode_t cmode, struct acl *dacl) return (mode); } - static int acl_posix1e_modload(module_t mod, int what, void *arg) { diff --git a/sys/kern/subr_blist.c b/sys/kern/subr_blist.c index 5672e0f2ba8a..c98744615ec9 100644 --- a/sys/kern/subr_blist.c +++ b/sys/kern/subr_blist.c @@ -192,7 +192,6 @@ bitrange(int n, int count) ((u_daddr_t)-1 >> (BLIST_BMAP_RADIX - (n + count)))); } - /* * Find the first bit set in a u_daddr_t. */ diff --git a/sys/kern/subr_bufring.c b/sys/kern/subr_bufring.c index 73590e49368b..912c537b7596 100644 --- a/sys/kern/subr_bufring.c +++ b/sys/kern/subr_bufring.c @@ -29,7 +29,6 @@ #include __FBSDID("$FreeBSD$"); - #include #include #include @@ -37,7 +36,6 @@ __FBSDID("$FreeBSD$"); #include #include - struct buf_ring * buf_ring_alloc(int count, struct malloc_type *type, int flags, struct mtx *lock) { diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index efc5e55c7fa9..e66a71f68eb4 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -3591,7 +3591,6 @@ resource_list_release_active(struct resource_list *rl, device_t bus, return (retval); } - /** * @brief Fully release a reserved resource * @@ -3907,7 +3906,6 @@ bus_generic_resume(device_t dev) return (0); } - /** * @brief Helper function for implementing BUS_RESET_POST * diff --git a/sys/kern/subr_clock.c b/sys/kern/subr_clock.c index e3a427c49a63..fa1884ddceac 100644 --- a/sys/kern/subr_clock.c +++ b/sys/kern/subr_clock.c @@ -84,7 +84,6 @@ SYSCTL_INT(_machdep, OID_AUTO, wall_cmos_clock, CTLFLAG_RW, * Derived from NetBSD arch/hp300/hp300/clock.c */ - #define FEBRUARY 2 #define days_in_year(y) (leapyear(y) ? 366 : 365) #define days_in_month(y, m) \ diff --git a/sys/kern/subr_csan.c b/sys/kern/subr_csan.c index 3a70a734ec46..8b82bbb1f89b 100644 --- a/sys/kern/subr_csan.c +++ b/sys/kern/subr_csan.c @@ -493,7 +493,6 @@ kcsan_copyout(const void *kaddr, void *uaddr, size_t len) atomic_subtract_##name(ptr, val); \ } - #define CSAN_ATOMIC_FUNC_SUBTRACT(name, type) \ _CSAN_ATOMIC_FUNC_SUBTRACT(name, type) \ _CSAN_ATOMIC_FUNC_SUBTRACT(acq_##name, type) \ @@ -535,7 +534,6 @@ kcsan_copyout(const void *kaddr, void *uaddr, size_t len) return (atomic_testandset_##name(ptr, val)); \ } - CSAN_ATOMIC_FUNC_ADD(8, uint8_t) CSAN_ATOMIC_FUNC_CLEAR(8, uint8_t) CSAN_ATOMIC_FUNC_CMPSET(8, uint8_t) @@ -660,7 +658,6 @@ CSAN_ATOMIC_FUNC_TESTANDSET(ptr, uintptr_t) atomic_thread_fence_##name(); \ } - CSAN_ATOMIC_FUNC_THREAD_FENCE(acq) CSAN_ATOMIC_FUNC_THREAD_FENCE(acq_rel) CSAN_ATOMIC_FUNC_THREAD_FENCE(rel) diff --git a/sys/kern/subr_fattime.c b/sys/kern/subr_fattime.c index 1c84382d4fbd..bc8bef4b089c 100644 --- a/sys/kern/subr_fattime.c +++ b/sys/kern/subr_fattime.c @@ -135,7 +135,6 @@ static const struct { { NOV + 3 * YEAR + 1, ENC(3, 12) } }; - void timespec2fattime(const struct timespec *tsp, int utc, uint16_t *ddp, uint16_t *dtp, uint8_t *dhp) diff --git a/sys/kern/subr_filter.c b/sys/kern/subr_filter.c index 1089dee452dc..0ddb0ba005f4 100644 --- a/sys/kern/subr_filter.c +++ b/sys/kern/subr_filter.c @@ -133,7 +133,6 @@ setup_time_filter_small(struct time_filter_small *tf, int fil_type, uint32_t tim return(0); } - static void check_update_times(struct time_filter *tf, uint64_t value, uint32_t now) { @@ -204,8 +203,6 @@ check_update_times_small(struct time_filter_small *tf, uint32_t value, uint32_t } } - - void filter_reduce_by(struct time_filter *tf, uint64_t reduce_by, uint32_t now) { @@ -294,7 +291,6 @@ forward_filter_clock(struct time_filter *tf, uint32_t ticks_forward) } } - void forward_filter_clock_small(struct time_filter_small *tf, uint32_t ticks_forward) { @@ -309,7 +305,6 @@ forward_filter_clock_small(struct time_filter_small *tf, uint32_t ticks_forward) } } - void tick_filter_clock(struct time_filter *tf, uint32_t now) { @@ -453,7 +448,6 @@ apply_filter_max(struct time_filter *tf, uint64_t value, uint32_t now) return (tf->entries[0].value); } - uint32_t apply_filter_max_small(struct time_filter_small *tf, uint32_t value, uint32_t now) diff --git a/sys/kern/subr_gtaskqueue.c b/sys/kern/subr_gtaskqueue.c index 3ad9275095af..16418b32253b 100644 --- a/sys/kern/subr_gtaskqueue.c +++ b/sys/kern/subr_gtaskqueue.c @@ -156,7 +156,6 @@ _gtaskqueue_create(const char *name, int mflags, return (queue); } - /* * Signal a taskqueue thread to terminate. */ @@ -570,7 +569,6 @@ gtaskqueue_thread_enqueue(void *context) wakeup_any(tq); } - static struct gtaskqueue * gtaskqueue_create_fast(const char *name, int mflags, taskqueue_enqueue_fn enqueue, void *context) @@ -579,7 +577,6 @@ gtaskqueue_create_fast(const char *name, int mflags, MTX_SPIN, "fast_taskqueue"); } - struct taskqgroup_cpu { LIST_HEAD(, grouptask) tgc_tasks; struct gtaskqueue *tgc_taskq; diff --git a/sys/kern/subr_hints.c b/sys/kern/subr_hints.c index ba30e23d9f8a..63ee87d27076 100644 --- a/sys/kern/subr_hints.c +++ b/sys/kern/subr_hints.c @@ -135,7 +135,6 @@ res_find(char **hintp_cookie, int *line, int *startln, char *hintp, *p; bool dyn_used = false; - /* * We are expecting that the caller will pass us a hintp_cookie that * they are tracking. Upon entry, if *hintp_cookie is *not* set, this @@ -449,7 +448,6 @@ resource_find_match(int *anchor, const char **name, int *unit, return ret; } - /* * err = resource_find_dev(&anchor, name, &unit, res, value); * Iterate through a list of devices, returning their unit numbers. diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c index a2f82333d457..471736e7c995 100644 --- a/sys/kern/subr_intr.c +++ b/sys/kern/subr_intr.c @@ -1262,7 +1262,6 @@ void intr_free_intr_map_data(struct intr_map_data *data) free(data, M_INTRNG); } - /* * Register a MSI/MSI-X interrupt controller */ @@ -1376,7 +1375,6 @@ intr_alloc_msix(device_t pci, device_t child, intptr_t xref, int *irq) ("%s: Found a non-MSI controller: %s", __func__, device_get_name(pic->pic_dev))); - err = MSI_ALLOC_MSIX(pic->pic_dev, child, &pdev, &isrc); if (err != 0) return (err); @@ -1445,7 +1443,6 @@ intr_map_msi(device_t pci, device_t child, intptr_t xref, int irq, return (err); } - void dosoftints(void); void dosoftints(void) @@ -1595,7 +1592,6 @@ intr_map_copy_map_data(u_int res_id, device_t *map_dev, intptr_t *map_xref, mtx_unlock(&irq_map_lock); } - /* * Allocate and fill new entry in irq_map table. */ diff --git a/sys/kern/subr_kdb.c b/sys/kern/subr_kdb.c index fa379b4da754..19d88186334b 100644 --- a/sys/kern/subr_kdb.c +++ b/sys/kern/subr_kdb.c @@ -258,7 +258,6 @@ kdb_sysctl_stack_overflow(SYSCTL_HANDLER_ARGS) return (0); } - void kdb_panic(const char *msg) { diff --git a/sys/kern/subr_sbuf.c b/sys/kern/subr_sbuf.c index 17fde523fc67..20a831aa75b2 100644 --- a/sys/kern/subr_sbuf.c +++ b/sys/kern/subr_sbuf.c @@ -302,7 +302,6 @@ void sbuf_set_flags(struct sbuf *s, int flags) { - s->s_flags |= (flags & SBUF_USRFLAGMSK); } diff --git a/sys/kern/subr_sleepqueue.c b/sys/kern/subr_sleepqueue.c index b635a6e4557b..8aef2aa72293 100644 --- a/sys/kern/subr_sleepqueue.c +++ b/sys/kern/subr_sleepqueue.c @@ -92,7 +92,6 @@ __FBSDID("$FreeBSD$"); #include #endif - /* * Constants for the hash table of sleep queue chains. * SC_TABLESIZE must be a power of two for SC_MASK to work properly. diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c index 92d3264f224c..818858909d71 100644 --- a/sys/kern/subr_smp.c +++ b/sys/kern/subr_smp.c @@ -803,7 +803,6 @@ smp_topo_2level(int l2share, int l2count, int l1share, int l1count, return (top); } - struct cpu_group * smp_topo_find(struct cpu_group *top, int cpu) { @@ -1006,7 +1005,6 @@ sysctl_kern_smp_active(SYSCTL_HANDLER_ARGS) return (error); } - #ifdef SMP void topo_init_node(struct topo_node *node) diff --git a/sys/kern/subr_stats.c b/sys/kern/subr_stats.c index 6181cf7bad74..b8bb5e9c9c64 100644 --- a/sys/kern/subr_stats.c +++ b/sys/kern/subr_stats.c @@ -1733,7 +1733,6 @@ stats_voistatdata_tdgst_tostr(enum vsd_dtype voi_dtype __unused, sizeof(qstr)); sbuf_cat(buf, qstr); - switch (fmt) { case SB_STRFMT_FREEFORM: fmtstr = is32bit ? ",cnt=%u}" : ",cnt=%ju}"; diff --git a/sys/kern/subr_unit.c b/sys/kern/subr_unit.c index 0ad76dc178ee..bad30c0811c3 100644 --- a/sys/kern/subr_unit.c +++ b/sys/kern/subr_unit.c @@ -143,7 +143,6 @@ _Malloc(size_t foo, int line) struct unrhdr; - struct mtx { int state; } unitmtx; @@ -225,7 +224,6 @@ ub_full(struct unrb *ub, int len) return (first_clear == -1); } - #if defined(DIAGNOSTIC) || !defined(_KERNEL) /* * Consistency check function. @@ -276,7 +274,6 @@ check_unrhdr(struct unrhdr *uh __unused, int line __unused) #endif - /* * Userland memory management. Just use calloc and keep track of how * many elements we have allocated for check_unrhdr(). @@ -1045,7 +1042,6 @@ main(int argc, char **argv) exit(2); } - } setbuf(stdout, NULL); diff --git a/sys/kern/subr_vmem.c b/sys/kern/subr_vmem.c index 5a577d6fb3b7..b35844a4faff 100644 --- a/sys/kern/subr_vmem.c +++ b/sys/kern/subr_vmem.c @@ -201,7 +201,6 @@ static uma_zone_t vmem_zone; #define VMEM_CONDVAR_WAIT(vm) cv_wait(&vm->vm_cv, &vm->vm_lock) #define VMEM_CONDVAR_BROADCAST(vm) cv_broadcast(&vm->vm_cv) - #define VMEM_LOCK(vm) mtx_lock(&vm->vm_lock) #define VMEM_TRYLOCK(vm) mtx_trylock(&vm->vm_lock) #define VMEM_UNLOCK(vm) mtx_unlock(&vm->vm_lock) diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index 7190ffc6be49..bf87e908ed8f 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -1915,7 +1915,6 @@ depart(struct witness *w) witness_increment_graph_generation(); } - static void adopt(struct witness *parent, struct witness *child) { @@ -2893,7 +2892,6 @@ witness_hash_djb2(const uint8_t *key, uint32_t size) return (hash); } - /* * Initializes the two witness hash tables. Called exactly once from * witness_initialize(). @@ -2966,7 +2964,6 @@ witness_hash_put(struct witness *w) w_hash.wh_count++; } - static struct witness_lock_order_data * witness_lock_order_get(struct witness *parent, struct witness *child) { diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 8e614a0accc6..c013e6832b71 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -1525,7 +1525,6 @@ pollrescan(struct thread *td) return (0); } - static int pollout(struct thread *td, struct pollfd *fds, struct pollfd *ufds, u_int nfd) { diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 5ef0a96635e6..10b1ca2395da 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -1606,7 +1606,6 @@ pipeclose(struct pipe *cpipe) pipelock(cpipe, 0); } - /* * Disconnect from peer, if any. */ diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index 5ec5f14fcf57..09db10c9ced3 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -880,7 +880,6 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data) } } - /* OK */ break; diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c index 33e958c0b745..de6faafde286 100644 --- a/sys/kern/sysv_msg.c +++ b/sys/kern/sysv_msg.c @@ -99,7 +99,6 @@ static int msg_prison_get(void *, void *); static int msg_prison_remove(void *, void *); static void msg_prison_cleanup(struct prison *); - #ifdef MSG_DEBUG #define DPRINTF(a) printf a #else @@ -352,7 +351,6 @@ msgunload() return (0); } - static int sysvmsg_modload(struct module *module, int cmd, void *arg) { diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c index 086c7a32be9f..dc89d7ae8348 100644 --- a/sys/kern/sysv_shm.c +++ b/sys/kern/sysv_shm.c @@ -609,7 +609,6 @@ kern_shmctl(struct thread *td, int shmid, int cmd, void *buf, size_t *bufsz) return (error); } - #ifndef _SYS_SYSPROTO_H_ struct shmctl_args { int shmid; @@ -658,7 +657,6 @@ done: return (error); } - static int shmget_existing(struct thread *td, struct shmget_args *uap, int mode, int segnum) diff --git a/sys/kern/uipc_mbuf.c b/sys/kern/uipc_mbuf.c index 8fec671a67f2..88946d045ca3 100644 --- a/sys/kern/uipc_mbuf.c +++ b/sys/kern/uipc_mbuf.c @@ -2113,7 +2113,6 @@ mbprof_clr_handler(SYSCTL_HANDLER_ARGS) return (error); } - SYSCTL_PROC(_kern_ipc, OID_AUTO, mbufprofile, CTLTYPE_STRING|CTLFLAG_RD, NULL, 0, mbprof_handler, "A", "mbuf profiling statistics"); diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 0bede5162fef..400857ecc0d5 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -316,7 +316,6 @@ static int unp_externalize_fp(struct file *); static struct mbuf *unp_addsockcred(struct thread *, struct mbuf *); static void unp_process_defers(void * __unused, int); - static void unp_pcb_hold(struct unpcb *unp) { @@ -385,7 +384,6 @@ unp_pcb_owned_lock2_slowpath(struct unpcb *unp, struct unpcb **unp2p, unp_pcb_owned_lock2_slowpath((unp), &(unp2), &freed); \ } while (0) - /* * Definitions of protocols supported in the LOCAL domain. */ @@ -705,7 +703,6 @@ uipc_close(struct socket *so) unp = sotounpcb(so); KASSERT(unp != NULL, ("uipc_close: unp == NULL")); - vplock = NULL; if ((vp = unp->unp_vnode) != NULL) { vplock = mtx_pool_find(mtxpool_sleep, vp); @@ -1026,7 +1023,6 @@ connect_internal(struct socket *so, struct sockaddr *nam, struct thread *td) return (error); } - static int uipc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *nam, struct mbuf *control, struct thread *td) diff --git a/sys/kern/vfs_acl.c b/sys/kern/vfs_acl.c index 4fee9e858e9e..9479706d041b 100644 --- a/sys/kern/vfs_acl.c +++ b/sys/kern/vfs_acl.c @@ -67,7 +67,6 @@ CTASSERT(ACL_MAX_ENTRIES >= OLDACL_MAX_ENTRIES); MALLOC_DEFINE(M_ACL, "acl", "Access Control Lists"); - static int kern___acl_aclcheck_path(struct thread *td, const char *path, acl_type_t type, struct acl *aclp, int follow); static int kern___acl_delete_path(struct thread *td, const char *path, diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index ec96659582ca..eee492ade431 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -779,7 +779,6 @@ bufspace_wait(struct bufdomain *bd, struct vnode *vp, int gbflags, BD_UNLOCK(bd); } - /* * bufspace_daemon: * @@ -942,7 +941,6 @@ waitrunningbufspace(void) mtx_unlock(&rbreqlock); } - /* * vfs_buf_test_cache: * diff --git a/sys/kern/vfs_cluster.c b/sys/kern/vfs_cluster.c index 7ab14f05fcfd..68e0d00c9954 100644 --- a/sys/kern/vfs_cluster.c +++ b/sys/kern/vfs_cluster.c @@ -802,7 +802,6 @@ cluster_write(struct vnode *vp, struct buf *bp, u_quad_t filesize, int seqcount, vp->v_lasta = bp->b_blkno; } - /* * This is an awful lot like cluster_rbuild...wish they could be combined. * The last lbn argument is the current block on which I/O is being diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index f9451527d250..11867ead52ad 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -673,7 +673,6 @@ extattr_list_vp(struct vnode *vp, int attrnamespace, void *data, return (error); } - #ifndef _SYS_SYSPROTO_H_ struct extattr_list_fd_args { int fd; diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c index c8b0684d1951..1e7a5f678469 100644 --- a/sys/kern/vfs_init.c +++ b/sys/kern/vfs_init.c @@ -523,7 +523,6 @@ vfs_register(struct vfsconf *vfc) return (0); } - /* Remove registration of a filesystem type */ static int vfs_unregister(struct vfsconf *vfc) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 1c087f8eb2d1..5f8450cfd26d 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -699,7 +699,6 @@ vntblinit(void *dummy __unused) } SYSINIT(vfs, SI_SUB_VFS, SI_ORDER_FIRST, vntblinit, NULL); - /* * Mark a mount point as busy. Used to synchronize access and to delay * unmounting. Eventually, mountlist_mtx is not released on failure. @@ -6130,7 +6129,6 @@ vfs_cache_root_set(struct mount *mp, struct vnode *vp) * This interface replaces MNT_VNODE_FOREACH. */ - struct vnode * __mnt_vnode_next_all(struct vnode **mvp, struct mount *mp) { diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index 3f87c71817af..20ed0dc8f39d 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -4199,7 +4199,6 @@ getvnode(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp) return (0); } - /* * Get an (NFS) file handle. */ diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 61edb3165e01..963550b9e1eb 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -1293,7 +1293,6 @@ vn_io_fault_pgmove(vm_page_t ma[], vm_offset_t offset, int xfersize, return (0); } - /* * File table truncate routine. */ @@ -1855,7 +1854,6 @@ vn_finished_write(struct mount *mp) MNT_IUNLOCK(mp); } - /* * Filesystem secondary write operation has completed. If we are * suspending and this operation is the last one, notify the suspender @@ -1877,8 +1875,6 @@ vn_finished_secondary_write(struct mount *mp) MNT_IUNLOCK(mp); } - - /* * Request a filesystem to suspend write operations. */