mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Ingo Molnar <mingo@kernel.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	a.p.zijlstra@chello.nl, riel@redhat.com,
	akpm@linux-foundation.org, aarcange@redhat.com,
	tglx@linutronix.de
Subject: [tip:numa/core] numa, sched: Eliminate unused functions
Date: Wed, 24 Oct 2012 02:37:49 -0700	[thread overview]
Message-ID: <tip-b6fc69b9e76352786cd945ce3175780fffb467f0@git.kernel.org> (raw)

Commit-ID:  b6fc69b9e76352786cd945ce3175780fffb467f0
Gitweb:     http://git.kernel.org/tip/b6fc69b9e76352786cd945ce3175780fffb467f0
Author:     Ingo Molnar <mingo@kernel.org>
AuthorDate: Wed, 24 Oct 2012 09:04:41 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 24 Oct 2012 09:11:16 +0200

numa, sched: Eliminate unused functions

Andrew Morton reported these allnoconfig warnings:

  kernel/sched/fair.c:800: warning: 'task_h_load' declared 'static' but never defined
  kernel/sched/fair.c:1004: warning: 'account_numa_enqueue' defined but not used

These are only used on CONFIG_SMP - fix it.

We should eventually resolve the Kconfig complexities here by turning
SMP (and NUMA) scheduling either into a separate source code file, or
by creating a single-model scheduler, which happens to build to a small
object file on !CONFIG_SMP or !CONFIG_NUMA kernels not via #ifdefs but
via more clever build time code elimination and zero-size data fields.

That's not a simple patch.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Link: http://lkml.kernel.org/n/tip-wyctbug9qKulTs0umsxjyixi@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 kernel/sched/fair.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index dea3ca6..41ad458 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -797,7 +797,9 @@ update_stats_curr_start(struct cfs_rq *cfs_rq, struct sched_entity *se)
  * have.
  */
 
+#ifdef CONFIG_SMP
 static unsigned long task_h_load(struct task_struct *p);
+#endif
 
 #ifdef CONFIG_SCHED_NUMA
 static struct list_head *account_numa_enqueue(struct rq *rq, struct task_struct *p)
@@ -995,10 +997,12 @@ void task_tick_numa(struct rq *rq, struct task_struct *curr)
 	}
 }
 #else
+#ifdef CONFIG_SMP
 static struct list_head *account_numa_enqueue(struct rq *rq, struct task_struct *p)
 {
 	return NULL;
 }
+#endif
 
 static void account_numa_dequeue(struct rq *rq, struct task_struct *p)
 {
@@ -3760,12 +3764,13 @@ static inline void update_shares(int cpu)
 static inline void update_h_load(long cpu)
 {
 }
-
+#ifdef CONFIG_SMP
 static unsigned long task_h_load(struct task_struct *p)
 {
 	return p->se.load.weight;
 }
 #endif
+#endif
 
 /********** Helpers for find_busiest_group ************************/
 /*

                 reply	other threads:[~2012-10-24  9:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-b6fc69b9e76352786cd945ce3175780fffb467f0@git.kernel.org \
    --to=mingo@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=riel@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome