spi: imx: use 'time_left' variable with wait_for_completion_timeout()
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 30 Apr 2024 11:41:35 +0000 (13:41 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 30 Apr 2024 14:57:28 +0000 (23:57 +0900)
commiteaeac043ab842d2e84616ff0412eec0121c1758c
treef28c42bb322dc4efaa26d22887d9241c24306965
parenteef51e99f7b9ecc903a3a9ad9e7ca84dc35c3f52
spi: imx: 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.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20240430114142.28551-4-wsa+renesas@sang-engineering.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-imx.c