Skip to content

Commit

Permalink
gcc-4.6: kernel/*: Fix unused but set warnings
Browse files Browse the repository at this point in the history
No real bugs I believe, just some dead code.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: andi@firstfloor.org
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Andi Kleen authored and Ingo Molnar committed Sep 5, 2010
1 parent ef5dc12 commit b3bd3de
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 12 deletions.
2 changes: 0 additions & 2 deletions kernel/debug/kdb/kdb_bp.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ static int kdb_bp(int argc, const char **argv)
int i, bpno;
kdb_bp_t *bp, *bp_check;
int diag;
int free;
char *symname = NULL;
long offset = 0ul;
int nextarg;
Expand Down Expand Up @@ -305,7 +304,6 @@ static int kdb_bp(int argc, const char **argv)
/*
* Find an empty bp structure to allocate
*/
free = KDB_MAXBPT;
for (bpno = 0, bp = kdb_breakpoints; bpno < KDB_MAXBPT; bpno++, bp++) {
if (bp->bp_free)
break;
Expand Down
3 changes: 1 addition & 2 deletions kernel/hrtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1091,11 +1091,10 @@ EXPORT_SYMBOL_GPL(hrtimer_cancel);
*/
ktime_t hrtimer_get_remaining(const struct hrtimer *timer)
{
struct hrtimer_clock_base *base;
unsigned long flags;
ktime_t rem;

base = lock_hrtimer_base(timer, &flags);
lock_hrtimer_base(timer, &flags);
rem = hrtimer_expires_remaining(timer);
unlock_hrtimer_base(timer, &flags);

Expand Down
3 changes: 1 addition & 2 deletions kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -1313,7 +1313,7 @@ static struct sched_group *
find_idlest_group(struct sched_domain *sd, struct task_struct *p,
int this_cpu, int load_idx)
{
struct sched_group *idlest = NULL, *this = NULL, *group = sd->groups;
struct sched_group *idlest = NULL, *group = sd->groups;
unsigned long min_load = ULONG_MAX, this_load = 0;
int imbalance = 100 + (sd->imbalance_pct-100)/2;

Expand Down Expand Up @@ -1348,7 +1348,6 @@ find_idlest_group(struct sched_domain *sd, struct task_struct *p,

if (local_group) {
this_load = avg_load;
this = group;
} else if (avg_load < min_load) {
min_load = avg_load;
idlest = group;
Expand Down
5 changes: 1 addition & 4 deletions kernel/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1713,10 +1713,7 @@ static __init int sysctl_init(void)
{
sysctl_set_parent(NULL, root_table);
#ifdef CONFIG_SYSCTL_SYSCALL_CHECK
{
int err;
err = sysctl_check_table(current->nsproxy, root_table);
}
sysctl_check_table(current->nsproxy, root_table);
#endif
return 0;
}
Expand Down
2 changes: 0 additions & 2 deletions kernel/trace/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -2985,13 +2985,11 @@ static void rb_advance_reader(struct ring_buffer_per_cpu *cpu_buffer)

static void rb_advance_iter(struct ring_buffer_iter *iter)
{
struct ring_buffer *buffer;
struct ring_buffer_per_cpu *cpu_buffer;
struct ring_buffer_event *event;
unsigned length;

cpu_buffer = iter->cpu_buffer;
buffer = cpu_buffer->buffer;

/*
* Check if we are at the end of the buffer.
Expand Down

0 comments on commit b3bd3de

Please sign in to comment.