ALSA: aoa: soundbus: i2sbus: pcm: use 'time_left' variable with wait_for_completion_t...
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 30 Apr 2024 12:10:27 +0000 (14:10 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 8 May 2024 16:15:06 +0000 (18:15 +0200)
commit222a596640295e5f2deb7bd0a805f8f6a3068069
tree927bffba3b6112b34639360b0b555e520bf73cf1
parent44f69ddccb66bcdf969c44d8bb5d4dea4d6b2933
ALSA: aoa: soundbus: i2sbus: pcm: 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/20240430121028.30443-1-wsa+renesas@sang-engineering.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/aoa/soundbus/i2sbus/pcm.c