On 24.02.20 01:20, Chris Packham wrote:
On some platforms/architectures the value from get_timer() can wrap.
This is particularly problematic when long-running code needs to measure
a time difference as is the case with watchdog_reset() which tries to
avoid tickling the watchdog too frequently.

Use time_after() from time.h instead of a plain > comparison to avoid
any issues with the time wrapping on a system that has been sitting in
u-boot for a long time.

Signed-off-by: Chris Packham <judge.pack...@gmail.com>

Reviewed-by: Stefan Roese <s...@denx.de>

Thanks,
Stefan

Reply via email to