spi: xlp: use 'time_left' variable with wait_for_completion_timeout()
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 30 Apr 2024 11:41:40 +0000 (13:41 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 30 Apr 2024 14:57:32 +0000 (23:57 +0900)
commit594aa75d6bdda85b5fd027a5056d8cd1345c1db3
tree6ce763791bf3e508f246698041f62caa2b84eaca
parent83a3f1ba60d6e2f73c9dd2627a8ce41867dbc46b
spi: xlp: use 'time_left' variable with wait_for_completion_timeout()

There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_for_completion_timeout() causing patterns like:

timeout = wait_for_completion_timeout(...)
if (!timeout) return -ETIMEDOUT;

with all kinds of permutations. Use 'time_left' as a variable to make the code
self explaining.

Fix to the proper variable type 'unsigned long' while here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240430114142.28551-9-wsa+renesas@sang-engineering.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-xlp.c