Thread (46 messages) 46 messages, 17 authors, 2024-01-10
STALE871d LANDED
Revisions (2)
  1. v1 [diff vs current]
  2. v1 current

[PATCH 04/22] [RESEND] time: make sysfs_get_uname() function visible in header

From: Arnd Bergmann <arnd@kernel.org>
Date: 2023-11-08 13:00:13
Also in: dri-devel, linux-alpha, linux-bcachefs, linux-fbdev, linux-kbuild, linux-m68k, linux-mips, linux-riscv, linux-s390, linux-sh, linux-usb, linuxppc-dev, lkml, loongarch, netdev, sparclinux
Subsystem: nohz, dynticks support, the rest · Maintainers: Anna-Maria Behnsen, Frederic Weisbecker, Ingo Molnar, Thomas Gleixner, Linus Torvalds

From: Arnd Bergmann <arnd@arndb.de>

This function is defined globally in clocksource.c and used conditionally
in clockevent.c, which the declaration hidden when clockevent support
is disabled. This causes a harmless warning in the definition:

kernel/time/clocksource.c:1324:9: warning: no previous prototype for 'sysfs_get_uname' [-Wmissing-prototypes]
 1324 | ssize_t sysfs_get_uname(const char *buf, char *dst, size_t cnt)

Move the declaration out of the #ifdef so it is always visible.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 kernel/time/tick-internal.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h
index 649f2b48e8f0..481b7ab65e2c 100644
--- a/kernel/time/tick-internal.h
+++ b/kernel/time/tick-internal.h
@@ -56,7 +56,6 @@ extern int clockevents_program_event(struct clock_event_device *dev,
 				     ktime_t expires, bool force);
 extern void clockevents_handle_noop(struct clock_event_device *dev);
 extern int __clockevents_update_freq(struct clock_event_device *dev, u32 freq);
-extern ssize_t sysfs_get_uname(const char *buf, char *dst, size_t cnt);
 
 /* Broadcasting support */
 # ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
@@ -197,3 +196,5 @@ void hrtimers_resume_local(void);
 #else
 #define JIFFIES_SHIFT	8
 #endif
+
+extern ssize_t sysfs_get_uname(const char *buf, char *dst, size_t cnt);
-- 
2.39.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help