Skip to content

Commit a89299c

Browse files
arndbKAGA-KOKO
authored andcommitted
time: Make sysfs_get_uname() function visible in header
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> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20231108125843.3806765-5-arnd@kernel.org
1 parent 98b1cc8 commit a89299c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/time/tick-internal.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ extern int clockevents_program_event(struct clock_event_device *dev,
5656
ktime_t expires, bool force);
5757
extern void clockevents_handle_noop(struct clock_event_device *dev);
5858
extern int __clockevents_update_freq(struct clock_event_device *dev, u32 freq);
59-
extern ssize_t sysfs_get_uname(const char *buf, char *dst, size_t cnt);
6059

6160
/* Broadcasting support */
6261
# ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST
@@ -197,3 +196,5 @@ void hrtimers_resume_local(void);
197196
#else
198197
#define JIFFIES_SHIFT 8
199198
#endif
199+
200+
extern ssize_t sysfs_get_uname(const char *buf, char *dst, size_t cnt);

0 commit comments

Comments
 (0)