[PATCH 2/2] mtd: rawnand: intel: use 'time_left' variable with wait_for_completion_timeout()

Miquel Raynal miquel.raynal at bootlin.com
Mon Jul 1 05:00:26 PDT 2024


On Tue, 2024-06-04 at 21:29:21 UTC, Wolfram Sang wrote:
> 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 at sang-engineering.com>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel



More information about the linux-mtd mailing list