Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200302
b: refs/heads/master
c: 1610682
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed Jun 8, 2010
1 parent 870a243 commit c603f1c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 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: b9b76dfaac6fa2c289ee8a005be637afd2da7e2f
refs/heads/master: 16106822b67e0a5eb228aebf47e33d6cad1e91b6
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/oprofile/op_model_cell.c
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ static int calculate_lfsr(int n)
index = ENTRIES-1;

/* make sure index is valid */
if ((index > ENTRIES) || (index < 0))
if ((index >= ENTRIES) || (index < 0))
index = ENTRIES-1;

return initial_lfsr[index];
Expand Down
5 changes: 4 additions & 1 deletion trunk/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1507,6 +1507,9 @@ do { \
divisor = nsec * frequency;
}

if (!divisor)
return dividend;

return div64_u64(dividend, divisor);
}

Expand All @@ -1529,7 +1532,7 @@ static int perf_event_start(struct perf_event *event)
static void perf_adjust_period(struct perf_event *event, u64 nsec, u64 count)
{
struct hw_perf_event *hwc = &event->hw;
u64 period, sample_period;
s64 period, sample_period;
s64 delta;

period = perf_calculate_period(event, nsec, count);
Expand Down

0 comments on commit c603f1c

Please sign in to comment.