]> git.baikalelectronics.ru Git - kernel.git/commitdiff
posix-timers: Make do_clock_gettime() static
authorJiri Slaby <jslaby@suse.cz>
Tue, 19 Jul 2022 08:56:20 +0000 (10:56 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 6 Aug 2022 08:33:54 +0000 (10:33 +0200)
do_clock_gettime() is used only in posix-stubs.c, so make it static. It avoids
a compiler warning too:
time/posix-stubs.c:73:5: warning: no previous prototype for ‘do_clock_gettime’ [-Wmissing-prototypes]

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20220719085620.30567-1-jslaby@suse.cz
kernel/time/posix-stubs.c

index fcb3b21d8bdcd444f32165f98dd9fe078b3d2446..90ea5f373e50ecfa807a6df6bc92ad0326d43ef4 100644 (file)
@@ -70,7 +70,7 @@ SYSCALL_DEFINE2(clock_settime, const clockid_t, which_clock,
        return do_sys_settimeofday64(&new_tp, NULL);
 }
 
-int do_clock_gettime(clockid_t which_clock, struct timespec64 *tp)
+static int do_clock_gettime(clockid_t which_clock, struct timespec64 *tp)
 {
        switch (which_clock) {
        case CLOCK_REALTIME:
@@ -90,6 +90,7 @@ int do_clock_gettime(clockid_t which_clock, struct timespec64 *tp)
 
        return 0;
 }
+
 SYSCALL_DEFINE2(clock_gettime, const clockid_t, which_clock,
                struct __kernel_timespec __user *, tp)
 {