Skip to content
Commit 8599099f authored by Andre Guedes's avatar Andre Guedes Committed by David S. Miller
Browse files

net: sched: taprio: Refactor taprio_get_start_time()



This patch does a code refactoring to taprio_get_start_time() function
to improve readability and report error properly.

If 'base' time is later than 'now', the start time is equal to 'base'
and taprio_get_start_time() is done. That's the natural case so we move
that code to the beginning of the function. Also, if 'cycle' calculation
is zero, something went really wrong with taprio and we should log that
internal error properly.

Signed-off-by: default avatarAndre Guedes <andre.guedes@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 59ab87f6
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment