Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 388feff2 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "sched: walt: fix out-of-bounds access"

parents ac7647c0 c82c3d23
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -655,14 +655,11 @@ static inline void inter_cluster_migration_fixup
	BUG_ON((s64)src_rq->nt_curr_runnable_sum < 0);
}

static int load_to_index(u32 load)
static u32 load_to_index(u32 load)
{
	if (load < sched_load_granule)
		return 0;
	else if (load >= sched_ravg_window)
		return NUM_LOAD_INDICES - 1;
	else
		return load / sched_load_granule;
	u32 index = load / sched_load_granule;

	return min(index, (u32)(NUM_LOAD_INDICES - 1));
}

static void