Re: [PATCH 2/6] wifi: brcmfmac: use 'time_left' variable with wait_event_timeout()

From: Arend van Spriel
Date: Mon Jun 03 2024 - 05:48:13 EST


On 6/3/2024 11:15 AM, Wolfram Sang wrote:
There is a confusing pattern in the kernel to use a variable named 'timeout' to
store the result of wait_event_timeout() causing patterns like:

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

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

I feel this type of changes fall into the category of bike-shedding. People should know how wait_event_timeout() works and then a variable name does not really matter.

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

But it may have useful side-effects to go over the code with fresh look. Thanks.

Acked-by: Arend van Spriel <arend.vanspriel@xxxxxxxxxxxx>
Signed-off-by: Wolfram Sang <wsa+renesas@xxxxxxxxxxxxxxxxxxxx>
---
.../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature