Skip to content

Commit

Permalink
sched/deadline: Fix sparse static warnings
Browse files Browse the repository at this point in the history
new sparse warnings:

  >> kernel/sched/cpudeadline.c:38:6: sparse: symbol 'cpudl_exchange' was not declared. Should it be static?
  >> kernel/sched/cpudeadline.c:46:6: sparse: symbol 'cpudl_heapify' was not declared. Should it be static?
  >> kernel/sched/cpudeadline.c:71:6: sparse: symbol 'cpudl_change_key' was not declared. Should it be static?
  >> kernel/sched/cpudeadline.c:195:15: sparse: memset with byte count of 163928

Signed-off-by: Fengguang Wu <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Cc: Juri Lelli <[email protected]>
Fixes: 6bfd6d7 ("sched/deadline: speed up SCHED_DEADLINE pushes with a push-heap")
Link: http://lkml.kernel.org/r/52d47f8c.EYJsA5+mELPBk4t6\%[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Fengguang Wu authored and Ingo Molnar committed Jan 16, 2014
1 parent 54b278b commit 88f1ebb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kernel/sched/cpudeadline.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ static inline int dl_time_before(u64 a, u64 b)
return (s64)(a - b) < 0;
}

void cpudl_exchange(struct cpudl *cp, int a, int b)
static void cpudl_exchange(struct cpudl *cp, int a, int b)
{
int cpu_a = cp->elements[a].cpu, cpu_b = cp->elements[b].cpu;

swap(cp->elements[a], cp->elements[b]);
swap(cp->cpu_to_idx[cpu_a], cp->cpu_to_idx[cpu_b]);
}

void cpudl_heapify(struct cpudl *cp, int idx)
static void cpudl_heapify(struct cpudl *cp, int idx)
{
int l, r, largest;

Expand All @@ -68,7 +68,7 @@ void cpudl_heapify(struct cpudl *cp, int idx)
}
}

void cpudl_change_key(struct cpudl *cp, int idx, u64 new_dl)
static void cpudl_change_key(struct cpudl *cp, int idx, u64 new_dl)
{
WARN_ON(idx > num_present_cpus() || idx == IDX_INVALID);

Expand Down

0 comments on commit 88f1ebb

Please sign in to comment.