5.4 compile error fix: ISO C90 forbids mixed declarations and code
This commit is contained in:
parent
30aca2aa4e
commit
0769637133
1 changed files with 7 additions and 4 deletions
|
@ -142,14 +142,17 @@ static inline u64 scale_slice(u64 delta, struct sched_entity *se) {
|
|||
static inline struct task_struct *task_of(struct sched_entity *se);
|
||||
|
||||
static void update_burst_score(struct sched_entity *se) {
|
||||
struct task_struct *p;
|
||||
u8 prio, prev_prio, new_prio;
|
||||
|
||||
if (!entity_is_task(se)) return;
|
||||
struct task_struct *p = task_of(se);
|
||||
u8 prio = p->static_prio - MAX_RT_PRIO;
|
||||
u8 prev_prio = min(39, prio + se->burst_score);
|
||||
p = task_of(se);
|
||||
prio = p->static_prio - MAX_RT_PRIO;
|
||||
prev_prio = min(39, prio + se->burst_score);
|
||||
|
||||
se->burst_score = se->burst_penalty >> 2;
|
||||
|
||||
u8 new_prio = min(39, prio + se->burst_score);
|
||||
new_prio = min(39, prio + se->burst_score);
|
||||
if (new_prio != prev_prio)
|
||||
reweight_task(p, new_prio);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue