Skip to contentSkip to conversation

posix-timers: make do_clock_gettime() static

PATCH Applied Jiri Slaby 2 participants 2 messages Jul 19, 2022 – Aug 6, 2022 Posix clocks and timers

lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

PATCH 1/1 posix-timers: make do_clock_gettime() static

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]

Cc Thomas Gleixner <[email protected]>
---
 kernel/time/posix-stubs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/time/posix-stubs.c +2 -1
index fcb3b21d8bdc..90ea5f373e50 100644
@@ -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)
 {
Signature · 1 line
2.37.1
merge bot Applied
#1 lore raw

[tip: timers/urgent] posix-timers: Make do_clock_gettime() static

The following commit has been merged into the timers/urgent branch of tip:

The following commit has been merged into the timers/urgent branch of tip:

Commit-ID:     221f9d9cdf429df8c3843b4291f4f412fde11543
Gitweb:        https://git.kernel.org/tip/221f9d9cdf429df8c3843b4291f4f412fde11543
Author:        Jiri Slaby <[email protected]>
AuthorDate:    Tue, 19 Jul 2022 10:56:20 +02:00
Committer:     Thomas Gleixner <[email protected]>
CommitterDate: Sat, 06 Aug 2022 10:33:54 +02:00

posix-timers: Make do_clock_gettime() static

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]

---
 kernel/time/posix-stubs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/time/posix-stubs.c +2 -1
index fcb3b21..90ea5f3 100644
@@ -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)
 {