linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] posix-timers: make do_clock_gettime() static
@ 2022-07-19  8:56 Jiri Slaby
  2022-08-06  8:39 ` [tip: timers/urgent] posix-timers: Make " tip-bot2 for Jiri Slaby
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Slaby @ 2022-07-19  8:56 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, Jiri Slaby

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 <tglx@linutronix.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
 kernel/time/posix-stubs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/time/posix-stubs.c b/kernel/time/posix-stubs.c
index fcb3b21d8bdc..90ea5f373e50 100644
--- a/kernel/time/posix-stubs.c
+++ b/kernel/time/posix-stubs.c
@@ -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)
 {
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [tip: timers/urgent] posix-timers: Make do_clock_gettime() static
  2022-07-19  8:56 [PATCH] posix-timers: make do_clock_gettime() static Jiri Slaby
@ 2022-08-06  8:39 ` tip-bot2 for Jiri Slaby
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Jiri Slaby @ 2022-08-06  8:39 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Jiri Slaby, Thomas Gleixner, x86, linux-kernel

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 <jslaby@suse.cz>
AuthorDate:    Tue, 19 Jul 2022 10:56:20 +02:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
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]

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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/time/posix-stubs.c b/kernel/time/posix-stubs.c
index fcb3b21..90ea5f3 100644
--- a/kernel/time/posix-stubs.c
+++ b/kernel/time/posix-stubs.c
@@ -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)
 {

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-06  8:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-19  8:56 [PATCH] posix-timers: make do_clock_gettime() static Jiri Slaby
2022-08-06  8:39 ` [tip: timers/urgent] posix-timers: Make " tip-bot2 for Jiri Slaby

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).