linux-next: build warning after merge of the tip tree
Hi all,
After merging the tip tree, today's linux-next build (powerpc ppc64_defconfig) produced this warning:
kernel/time/clocksource.c:1258:13: warning: '__clocksource_change_rating' defined but not used [-Wunused-function]
1258 | static void __clocksource_change_rating(struct clocksource *cs, int rating)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Introduced by commit
5ce9bb4d5af2 ("clocksource: Remove unused clocksource_change_rating")
CONFIG_CLOCKSOURCE_WATCHDOG is not set for his build.
Signature · 2 lines
Cheers, Stephen Rothwell
Hi all,
Quoted 6 lines · On Fri, 11 Oct 2024 13:55:15 +1100 Stephen Rothwell <[email protected]>…
After merging the tip tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:
kernel/time/clocksource.c:1258:13: warning: '__clocksource_change_rating' defined but not used [-Wunused-function]
1258 | static void__clocksource_change_rating(struct clocksource *cs, int rating)
Quoted 7 lines
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~Introduced by commit
5ce9bb4d5af2("clocksource: Remove unusedclocksource_change_rating")
CONFIG_CLOCKSOURCE_WATCHDOGis not set for his build.
This became a build failure in my powerpc allyesconfig build, so I applied the following patch.
From: Stephen Rothwell <[email protected]>
Date: Fri, 11 Oct 2024 17:26:18 +1100
Subject: [PATCH] fix up for "clocksource: Remove unused clocksource_change_rating"
--- kernel/time/clocksource.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
kernel/time/clocksource.c +9 -8
@@ -171,7 +171,6 @@ static inline void clocksource_watchdog_unlock(unsigned long *flags) }static int clocksource_watchdog_kthread (void *data); -static void __clocksource_change_rating (struct clocksource *cs,int rating);static void clocksource_watchdog_work (struct work_struct *work) {
@@ -681,6 +680,15 @@ static void clocksource_dequeue_watchdog(struct clocksource *cs) } } +static void clocksource_enqueue (struct clocksource *cs); + +static void __clocksource_change_rating (struct clocksource *cs,int rating) +{ +list_del (&cs->list); + cs->rating = rating; +clocksource_enqueue (cs); +} +static int __clocksource_watchdog_kthread (void ) {struct clocksource *cs, *tmp;
@@ -1255,13 +1263,6 @@ int __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq) }EXPORT_SYMBOL_GPL (__clocksource_register_scale); -static void __clocksource_change_rating (struct clocksource *cs,int rating) -{ -list_del (&cs->list); - cs->rating = rating; -clocksource_enqueue (cs); -} -/* * Unbind clocksource @cs. Called with clocksource_mutex held */
Signature · 5 lines
2.45.2 -- Cheers, Stephen Rothwell
Quoted 8 lines · Stephen Rothwell
Quoted 7 lines · On Fri, 11 Oct 2024 13:55:15 +1100 Stephen Rothwell <[email protected]>…
After merging the tip tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:
kernel/time/clocksource.c:1258:13: warning: '__clocksource_change_rating' defined but not used [-Wunused-function]
1258 | static void__clocksource_change_rating(struct clocksource *cs, int rating)| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Yes. I fixed it up on my tree and then forgot to push it into tip. Sorry!
Thanks,
tglx
Quoted 6 lines · * Thomas Gleixner ([email protected]) wrote:
Quoted 5 lines · Stephen Rothwell
Quoted 4 lines · On Fri, 11 Oct 2024 13:55:15 +1100 Stephen Rothwell <[email protected]>…
After merging the tip tree, today's linux-next build (powerpc
ppc64_defconfig) produced this warning:
Quoted 6 lines
Quoted 3 lines
Quoted 3 lines
kernel/time/clocksource.c:1258:13: warning: '__clocksource_change_rating' defined but not used [-Wunused-function]
1258 | static void__clocksource_change_rating(struct clocksource *cs, int rating)| ^~~~~~~~~~~~~~~~~~~~~~~~~~~Yes. I fixed it up on my tree and then forgot to push it into tip. Sorry!
Thanks for that and apologies for not spotting it in my v1.
Dave
P.S. If you get a chance I'd appreicate if you could look at another deadcode of mine in x86:
https://lore.kernel.org/lkml/[email protected]/
Quoted 4 lines
Thanks,
tglx
Signature · 4 lines
-----Open up your eyes, open up your mind, open up your code ------- / Dr. David Alan Gilbert | Running GNU/Linux | Happy \ \ dave @ treblig.org | | In Hex / \ _________________________|_____ http://www.treblig.org |_______/