cobalt/sched-quota: Allow NULL quota_sum_r in
PATCH 1/1 cobalt/sched-quota: Allow NULL quota_sum_r in
From: Jan Kiszka <[email protected]>
Avoids pointless dummy variables on the call-site.
Signed-off-by Jan Kiszka <[email protected]>
--- kernel/cobalt/posix/sched.c | 5 +---- kernel/cobalt/sched-quota.c | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-)
kernel/cobalt/posix/sched.c +1 -4
@@ -830,9 +830,6 @@ void cobalt_sched_reclaim(struct cobalt_process *process) {struct cobalt_resources *p = &process->resources;struct cobalt_sched_group *group; -#ifdef CONFIG_XENO_OPT_SCHED_QUOTA -int quota_sum; -#endif spl_t s;xnlock_get_irqsave (&nklock, s);
@@ -840,7 +837,7 @@ void cobalt_sched_reclaim(struct cobalt_process *process)while (!list_empty (&p->schedq)) { group = list_get_entry(&p->schedq, struct cobalt_sched_group, next);#ifdef CONFIG_XENO_OPT_SCHED_QUOTA -xnsched_quota_destroy_group (&group->quota,1 , "a_sum); +xnsched_quota_destroy_group (&group->quota,1 ,NULL );#endif xnlock_put_irqrestore (&nklock, s);xnfree (group);
kernel/cobalt/sched-quota.c +2 -1
@@ -573,7 +573,8 @@ int xnsched_quota_destroy_group(struct xnsched_quota_group *tg,if (list_empty (&qs->groups))xntimer_stop (&qs->refill_timer); - *quota_sum_r =quota_sum_all (qs); +if (quota_sum_r) + *quota_sum_r =quota_sum_all (qs);return 0 ; }
Signature · 1 line
2.16.4