mtd: rawnand: intel: use 'time_left' variable with wait_for_completion_timeout()
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 4 Jun 2024 21:29:21 +0000 (23:29 +0200)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Wed, 17 Jul 2024 08:39:38 +0000 (10:39 +0200)
commite33df1c488d6e2b58064355651adb51901137036
tree8500026554f1e734e4636bd23222a70ccca5caff
parentbf66d81975d4240b46659ea2392fe65d83527140
mtd: rawnand: intel: 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>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20240604212919.5038-6-wsa+renesas@sang-engineering.com
drivers/mtd/nand/raw/intel-nand-controller.c