From: Andre Guedes Date: Tue, 23 Apr 2019 19:44:22 +0000 (-0700) Subject: net: sched: taprio: Remove should_restart_cycle() X-Git-Tag: v5.4-rc1~1056^2~113^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5175aafe71bfb3fc6a1254a966b0f60e7a46ebba;p=platform%2Fkernel%2Flinux-rpi.git net: sched: taprio: Remove should_restart_cycle() The 'entry' argument from should_restart_cycle() cannot be NULL since it is already checked by the caller so the WARN_ON() within should_ restart_cycle() could be removed. By doing that, that function becomes a dummy wrapper on list_is_last() so this patch simply gets rid of it and call list_is_last() within advance_sched() instead. Signed-off-by: Andre Guedes Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c index d0aae7b..77cca99 100644 --- a/net/sched/sch_taprio.c +++ b/net/sched/sch_taprio.c @@ -209,14 +209,6 @@ static struct sk_buff *taprio_dequeue(struct Qdisc *sch) return NULL; } -static bool should_restart_cycle(const struct taprio_sched *q, - const struct sched_entry *entry) -{ - WARN_ON(!entry); - - return list_is_last(&entry->list, &q->entries); -} - static enum hrtimer_restart advance_sched(struct hrtimer *timer) { struct taprio_sched *q = container_of(timer, struct taprio_sched, @@ -240,7 +232,7 @@ static enum hrtimer_restart advance_sched(struct hrtimer *timer) goto first_run; } - if (should_restart_cycle(q, entry)) + if (list_is_last(&entry->list, &q->entries)) next = list_first_entry(&q->entries, struct sched_entry, list); else