Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276382
b: refs/heads/master
c: aa2bc1a
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Nov 14, 2011
1 parent 3f27548 commit 77e8a6e
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1d5f003f5a964711853514b04ddc872eec0fdc7b
refs/heads/master: aa2bc1ade59003a379ffc485d6da2d92ea3370a6
6 changes: 3 additions & 3 deletions trunk/arch/arm/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,15 +347,15 @@ validate_group(struct perf_event *event)
memset(&fake_pmu, 0, sizeof(fake_pmu));

if (!validate_event(&fake_pmu, leader))
return -ENOSPC;
return -EINVAL;

list_for_each_entry(sibling, &leader->sibling_list, group_entry) {
if (!validate_event(&fake_pmu, sibling))
return -ENOSPC;
return -EINVAL;
}

if (!validate_event(&fake_pmu, event))
return -ENOSPC;
return -EINVAL;

return 0;
}
Expand Down
8 changes: 4 additions & 4 deletions trunk/arch/mips/kernel/perf_event_mipsxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -623,7 +623,7 @@ static int mipspmu_event_init(struct perf_event *event)
if (!atomic_inc_not_zero(&active_events)) {
if (atomic_read(&active_events) > MIPS_MAX_HWEVENTS) {
atomic_dec(&active_events);
return -ENOSPC;
return -EINVAL;
}

mutex_lock(&pmu_reserve_mutex);
Expand Down Expand Up @@ -732,15 +732,15 @@ static int validate_group(struct perf_event *event)
memset(&fake_cpuc, 0, sizeof(fake_cpuc));

if (!validate_event(&fake_cpuc, leader))
return -ENOSPC;
return -EINVAL;

list_for_each_entry(sibling, &leader->sibling_list, group_entry) {
if (!validate_event(&fake_cpuc, sibling))
return -ENOSPC;
return -EINVAL;
}

if (!validate_event(&fake_cpuc, event))
return -ENOSPC;
return -EINVAL;

return 0;
}
Expand Down
10 changes: 5 additions & 5 deletions trunk/arch/x86/kernel/cpu/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ int x86_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign)
x86_pmu.put_event_constraints(cpuc, cpuc->event_list[i]);
}
}
return num ? -ENOSPC : 0;
return num ? -EINVAL : 0;
}

/*
Expand All @@ -607,7 +607,7 @@ static int collect_events(struct cpu_hw_events *cpuc, struct perf_event *leader,

if (is_x86_event(leader)) {
if (n >= max_count)
return -ENOSPC;
return -EINVAL;
cpuc->event_list[n] = leader;
n++;
}
Expand All @@ -620,7 +620,7 @@ static int collect_events(struct cpu_hw_events *cpuc, struct perf_event *leader,
continue;

if (n >= max_count)
return -ENOSPC;
return -EINVAL;

cpuc->event_list[n] = event;
n++;
Expand Down Expand Up @@ -1316,7 +1316,7 @@ static int validate_event(struct perf_event *event)
c = x86_pmu.get_event_constraints(fake_cpuc, event);

if (!c || !c->weight)
ret = -ENOSPC;
ret = -EINVAL;

if (x86_pmu.put_event_constraints)
x86_pmu.put_event_constraints(fake_cpuc, event);
Expand All @@ -1341,7 +1341,7 @@ static int validate_group(struct perf_event *event)
{
struct perf_event *leader = event->group_leader;
struct cpu_hw_events *fake_cpuc;
int ret = -ENOSPC, n;
int ret = -EINVAL, n;

fake_cpuc = allocate_fake_cpuc();
if (IS_ERR(fake_cpuc))
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kernel/cpu/perf_event_p4.c
Original file line number Diff line number Diff line change
Expand Up @@ -1268,7 +1268,7 @@ static int p4_pmu_schedule_events(struct cpu_hw_events *cpuc, int n, int *assign
}

done:
return num ? -ENOSPC : 0;
return num ? -EINVAL : 0;
}

static __initconst const struct x86_pmu p4_pmu = {
Expand Down

0 comments on commit 77e8a6e

Please sign in to comment.