[U-Boot] PATCH mtd CFI flash: timeout calculation underflow if imprecise 1kHz timer: fix

Alessandro Rubini
2009-08-06T13:31:10Z

>> + tout = tout * CONFIG_SYS_HZ / 1000 + 1;

> 2) There should be a Signed-off-by: from Alessandro, too.

Signed-off-by: Alessandro Rubini <rubini@gnudd.com>

> 5) Omit the "+1". It seems bogus to me.

Since the timeout is an error condition, It's better to have it longer
than shorter. Since integer division truncates towards 0, I'd better
give my hardware more time before signalling an error (an unlikely
situation), rather than timing out on an operation that would complete
in the expected time. This happens with low HZ values, which I know
are discouraged nowadays.

Not a big issue, anyway, I'm fine either way.

/alessandro