Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1268077

[PATCH v2] sched/rt: hide push_irq_work_func declaration

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject [PATCH v2] sched/rt: hide push_irq_work_func declaration
Date 2015-11-12 17:30 +0100
Message-ID <qu2V3-2MB-9@gated-at.bofh.it> (permalink)
References <qu12V-1Bf-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The push_irq_work_func() function is conditionally defined only
when both CONFIG_SMP and HAVE_RT_PUSH_IPI are defined, but the
forward declaration remains visibile without HAVE_RT_PUSH_IPI,
causing a gcc warning in ARM64 allnoconfig:

kernel/sched/rt.c:68:13: warning: 'push_irq_work_func' declared 'static' but never defined [-Wunused-function]

This changes the code to use the same condition for both the
declaration and the function definition, which gets rid of the
warning.

As Peter Zijlstra, we can possibly get rid of the whole HAVE_RT_PUSH_IPI
thing after:
8053871d0f7f ("smp: Fix smp_call_function_single_async() locking")

Until that is done, this patch can be used to avoid the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: b6366f048e0c ("sched/rt: Use IPI to trigger RT task push migration instead of pulling")
---
Found on arm64 allnoconfig

v2: now using #if defined() instead IS_ENABLED()

diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index e3cc16312046..ce7b36d6f477 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -64,7 +64,7 @@ static void start_rt_bandwidth(struct rt_bandwidth *rt_b)
        raw_spin_unlock(&rt_b->rt_runtime_lock);
 }
 
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) && defined(HAVE_RT_PUSH_IPI)
 static void push_irq_work_func(struct irq_work *work);
 #endif
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] sched/rt: hide push_irq_work_func declaration Arnd Bergmann <arnd@arndb.de> - 2015-11-12 15:30 +0100
  Re: [PATCH] sched/rt: hide push_irq_work_func declaration Steven Rostedt <rostedt@goodmis.org> - 2015-11-12 15:50 +0100
    Re: [PATCH] sched/rt: hide push_irq_work_func declaration Arnd Bergmann <arnd@arndb.de> - 2015-11-12 16:20 +0100
      Re: [PATCH] sched/rt: hide push_irq_work_func declaration Steven Rostedt <rostedt@goodmis.org> - 2015-11-12 16:50 +0100
  Re: [PATCH] sched/rt: hide push_irq_work_func declaration Peter Zijlstra <peterz@infradead.org> - 2015-11-12 16:00 +0100
    Re: [PATCH] sched/rt: hide push_irq_work_func declaration Steven Rostedt <rostedt@goodmis.org> - 2015-11-12 16:20 +0100
  [PATCH v2] sched/rt: hide push_irq_work_func declaration Arnd Bergmann <arnd@arndb.de> - 2015-11-12 17:30 +0100
    Re: [PATCH v2] sched/rt: hide push_irq_work_func declaration Steven Rostedt <rostedt@goodmis.org> - 2015-11-12 17:30 +0100

csiph-web