Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Nov 2021 21:13:29 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 2287ced2f568 - main - clock: Group the "clocks" SYSINIT with the function definition
Message-ID:  <202111152113.1AFLDTm9081379@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=2287ced2f5686aeda69676342d6a1ff6257f5f6d

commit 2287ced2f5686aeda69676342d6a1ff6257f5f6d
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2021-11-15 20:31:03 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-11-15 21:13:24 +0000

    clock: Group the "clocks" SYSINIT with the function definition
    
    This is how most SYSINITs are defined.  Also annotate the dummy
    parameter with __unused.  No functional change intended.
    
    MFC after:      1 week
    Sponsored by:   The FreeBSD Foundation
---
 sys/kern/kern_clock.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c
index c215471ab2d9..3998ffd2a607 100644
--- a/sys/kern/kern_clock.c
+++ b/sys/kern/kern_clock.c
@@ -90,9 +90,6 @@ PMC_SOFT_DEFINE_EX( , , clock, prof, \
 extern void hardclock_device_poll(void);
 #endif /* DEVICE_POLLING */
 
-static void initclocks(void *dummy);
-SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_FIRST, initclocks, NULL);
-
 /* Spin-lock protecting profiling statistics. */
 static struct mtx time_lock;
 
@@ -391,9 +388,8 @@ static int devpoll_run = 0;
 /*
  * Initialize clock frequencies and start both clocks running.
  */
-/* ARGSUSED*/
 static void
-initclocks(void *dummy)
+initclocks(void *dummy __unused)
 {
 	int i;
 
@@ -421,6 +417,7 @@ initclocks(void *dummy)
 		wdog_software_attach = watchdog_attach;
 #endif
 }
+SYSINIT(clocks, SI_SUB_CLOCKS, SI_ORDER_FIRST, initclocks, NULL);
 
 static __noinline void
 hardclock_itimer(struct thread *td, struct pstats *pstats, int cnt, int usermode)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202111152113.1AFLDTm9081379>