From nobody Fri Feb 13 00:12:46 2026 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DD26114291B for ; Tue, 4 Jun 2024 21:22:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717536177; cv=none; b=eo/QsdwRg9Yn7elyG6XBvWDf/lobGIjOqm4GNC2VL/BMfAC/4CVFU4dcJdEkP0ATGREG3tRO3oHI3pn3JmS21neEqr0w/ttrZNFHBu02eC0GmXsw3axrg2jPPMW8t+Y1YGnUrEEmrNQmIlwBGJLuH/E4oPJ9oCxJIE9MBOwAJng= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717536177; c=relaxed/simple; bh=yi1+PN0Q2KuKxDPrpZS3RSPuvsy4y8L2mEsSu0fR8KE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gCPDZd5VbhBtsh73cy9V0CF+ToWD1G4nfoawrNrWuWICFO18eYxs+d1FduVN9Uoe51n18N4ote4Wfp5b5CT00y6FyWnLYw4Y9fgROiBJSXCAPvt8bHbeA1qdG+JYPf2YtK55LDi6iSPR6fNDY8y3RAABft8PZHnwqozMN/qfxW4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=SGJeqYyT; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="SGJeqYyT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=zu7xx2eHQSEtaJ5y0DAt4wwj31+TtPnP8i/Xy8v+7Ig=; b=SGJeqY yThEn9NkcXEnONbyRjyQ1Mm/zLakWb75IfNgpqnVOd6OgBkAQs0pGFawtjP/cYj9 OPt3z5vvW0vVLUOJvfwurCLtwWWcdSGf8CzIgJ4p6nm0XDVSyN0t5vPb4bzHNt4A KMq4PLmMRRXwQpuRSBnTPc86Wqh90TJOyf/tlS8K8vJN8XgKScwayiZ1nsxBA9DE SbPLK976XN/cddVo6iUH5X3is1LH1MZqon939mRpwA6feavo3WCiGCoadTb53lx3 PZc8MSrVv08PGKdwjeW2MQxlHkyRLfL+YN9NuU3+rsnPjtZr7jsA1tcBaBntTGIc WlU97MmOAH62hHqQ== Received: (qmail 2449422 invoked from network); 4 Jun 2024 23:22:51 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 4 Jun 2024 23:22:51 +0200 X-UD-Smtp-Session: l3s3148p1@QHpcDRcaqoFehhtB From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: Wolfram Sang , Arnd Bergmann , Greg Kroah-Hartman Subject: [PATCH 1/4] misc: apds990x: use 'time_left' variable with wait_event_interruptible_timeout() Date: Tue, 4 Jun 2024 23:22:36 +0200 Message-ID: <20240604212240.4529-2-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240604212240.4529-1-wsa+renesas@sang-engineering.com> References: <20240604212240.4529-1-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There is a confusing pattern in the kernel to use a variable named 'timeout= ' to store the result of wait_event_interruptible_timeout() causing patterns lik= e: timeout =3D wait_event_interruptible_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the c= ode self explaining. Signed-off-by: Wolfram Sang --- drivers/misc/apds990x.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/misc/apds990x.c b/drivers/misc/apds990x.c index 92b92be91d60..5fb29ebbb422 100644 --- a/drivers/misc/apds990x.c +++ b/drivers/misc/apds990x.c @@ -625,15 +625,15 @@ static ssize_t apds990x_lux_show(struct device *dev, struct apds990x_chip *chip =3D dev_get_drvdata(dev); ssize_t ret; u32 result; - long timeout; + long time_left; =20 if (pm_runtime_suspended(dev)) return -EIO; =20 - timeout =3D wait_event_interruptible_timeout(chip->wait, - !chip->lux_wait_fresh_res, - msecs_to_jiffies(APDS_TIMEOUT)); - if (!timeout) + time_left =3D wait_event_interruptible_timeout(chip->wait, + !chip->lux_wait_fresh_res, + msecs_to_jiffies(APDS_TIMEOUT)); + if (!time_left) return -EIO; =20 mutex_lock(&chip->mutex); --=20 2.43.0 From nobody Fri Feb 13 00:12:46 2026 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DBB12142900 for ; Tue, 4 Jun 2024 21:22:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717536178; cv=none; b=PxX674eF2C8ucmQTuNa8TG2OwkZGuWZbC9287vWYMnFYADueDQEgpg7TMyjY5MiZJInKRxQEHlIE/ToFgBxtrFqxFSnVfFwIIxyWYnLPhBQLVjlyYj3Eq514BG/vHXZqVEOETKwDeIrlcW77Ga+wcE5z2/ffvHIgefBbNDkXbOA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717536178; c=relaxed/simple; bh=RwnL/fVb3fxWF5xU1+hlDi7/ohtfBbLcJKY8CpcuiGw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=V8voV/DW5IPuO6yh/G9OK0BxkJ1wZU6l1wI/i0ugxVvqBvoMdB6NQXXcxG9hMlAVd3+T/SG/yCwH8gEoYWkeZQ7cdmqWOKXYdeHswRJxq/SE0oB2HATZxK8UOyN4Uhv+n8yZPaEQdJZ8cG0TmS4Bn26R3FUkPze8t1zs8rhC9yo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=HdUhTRCG; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="HdUhTRCG" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=hHM2yTb6jH238KQMlB0rLRIMwaywBfab4BIIdhDMmAI=; b=HdUhTR CGb3f+4iqMepYmiE+dJxLYb3q7Z0TSLKHHNSa1dsNPvtjP3vkQxGhUv04gXQ1z3X hENt2b2bBM6j7bSuWoIjHuOTlImtNro7Guy9UhaqpVzZMovl5F+v5nrPlEytEf/2 XZAdfqM4N5r9dumQxHZfEeff7gf2Ox/pbTPYl+e3T9OxJ6v79WC4Azj2Pxojscr+ lf452a6T5t4FZodZoJWCl8tQeeqbiy+rAy4fXrO5MuBKIMpNGEoWRvBjvgm4ZRaw TC5iWCx5LMZKJrOdVtVi4FGwV1tHVCxqdO36Hb6hklcdcFHtDP5ZvjVJwR4/rkv8 H5/0NJvnpUjTwYtQ== Received: (qmail 2449446 invoked from network); 4 Jun 2024 23:22:52 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 4 Jun 2024 23:22:52 +0200 X-UD-Smtp-Session: l3s3148p1@73JoDRcauIFehhtB From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: Wolfram Sang , Arnd Bergmann , Greg Kroah-Hartman Subject: [PATCH 2/4] misc: bh1770glc: use 'time_left' variable with wait_event_interruptible_timeout() Date: Tue, 4 Jun 2024 23:22:37 +0200 Message-ID: <20240604212240.4529-3-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240604212240.4529-1-wsa+renesas@sang-engineering.com> References: <20240604212240.4529-1-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There is a confusing pattern in the kernel to use a variable named 'timeout= ' to store the result of wait_event_interruptible_timeout() causing patterns lik= e: timeout =3D wait_event_interruptible_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the c= ode self explaining. Signed-off-by: Wolfram Sang --- drivers/misc/bh1770glc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/misc/bh1770glc.c b/drivers/misc/bh1770glc.c index 1629b62fd052..e1048d616306 100644 --- a/drivers/misc/bh1770glc.c +++ b/drivers/misc/bh1770glc.c @@ -680,15 +680,15 @@ static ssize_t bh1770_lux_result_show(struct device *= dev, { struct bh1770_chip *chip =3D dev_get_drvdata(dev); ssize_t ret; - long timeout; + long time_left; =20 if (pm_runtime_suspended(dev)) return -EIO; /* Chip is not enabled at all */ =20 - timeout =3D wait_event_interruptible_timeout(chip->wait, - !chip->lux_wait_result, - msecs_to_jiffies(BH1770_TIMEOUT)); - if (!timeout) + time_left =3D wait_event_interruptible_timeout(chip->wait, + !chip->lux_wait_result, + msecs_to_jiffies(BH1770_TIMEOUT)); + if (!time_left) return -EIO; =20 mutex_lock(&chip->mutex); --=20 2.43.0 From nobody Fri Feb 13 00:12:46 2026 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 847ED84E1C for ; Tue, 4 Jun 2024 21:22:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717536179; cv=none; b=J2uGVQ7s9nnWL6E8JR5m7IpOtjGNvsTnIM5nXS1pU+p2pJiHU7vNj0D753sCQX4gbo+jm7gCWTq8Ky22MIeALMnYSv/Cem3Qs8DbIgZ/XYQ8UyK3+iaza3DxgjiqwwfSiryHN3V2q0SYVZlptfHWLhE5PbqdIu1oSZ4RHAjb/z8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717536179; c=relaxed/simple; bh=fmVvY+JNZpsEx1YEUwXw+sagzKkVZJYhIwWRBRO3PPQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=b97TDRnhVE3ln0HhbLi3EP6+EwRv0776EROrvk7bGPoHWwWOfcWAViCAj3OjxsHN4vVwqkEapnHOfQSEgRlICqU1ky9P3kS/WOA8yiCfza1XEvPPbLkbG8LDILWV525OVipHRpRds4/VcR6kwRx7oQVh7h7yQ2qChNwr6F4l+AQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=TcP+bXez; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="TcP+bXez" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=ipB+dIDL7p2Y85aj9rGKHn6fFGIdgaCRl3bJhyD9eCA=; b=TcP+bX ez/Q27NRvYItnMWHJ64kQB3dT7Kil81i4X3R82XMbuQl+4obYVBWUqNYbqZ+LW1V KV8G6LRRSIEQiv6iX+PUsxlzeY/DrqTRDKyVvrdPDhp9jSHm7Wtxq7X5hPek74B7 ClUqB2P69JBFpAfgMd5Qq5XsIGo+ErZkCBmWSa9a6tmH3tpA8nm1rqc+UNw/EpQr /U35lm4ivT27EjDdy6tVa1bgKat9bi/6sxDNbmNPLn586m3kKLbX4yw7G2MPwgG7 vl/zM1SZWi3NicDVp2htNvegPpqX1K2evo7+ZrDztgTyqgfPcGB+xC+h6Rcd7vji e2KSqyBDGVOCaHaA== Received: (qmail 2449471 invoked from network); 4 Jun 2024 23:22:52 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 4 Jun 2024 23:22:52 +0200 X-UD-Smtp-Session: l3s3148p1@ILFzDRcaNN1ehhtB From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: Wolfram Sang , Alex Dubov , Arnd Bergmann , Greg Kroah-Hartman Subject: [PATCH 3/4] misc: tifm: use 'time_left' variable with wait_for_completion_timeout() Date: Tue, 4 Jun 2024 23:22:38 +0200 Message-ID: <20240604212240.4529-4-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240604212240.4529-1-wsa+renesas@sang-engineering.com> References: <20240604212240.4529-1-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 =3D wait_for_completion_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the c= ode self explaining. Signed-off-by: Wolfram Sang --- drivers/misc/tifm_7xx1.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/misc/tifm_7xx1.c b/drivers/misc/tifm_7xx1.c index 7dd86a9858ab..1d54680d6ed2 100644 --- a/drivers/misc/tifm_7xx1.c +++ b/drivers/misc/tifm_7xx1.c @@ -229,7 +229,7 @@ static int __maybe_unused tifm_7xx1_resume(struct devic= e *dev_d) struct pci_dev *dev =3D to_pci_dev(dev_d); struct tifm_adapter *fm =3D pci_get_drvdata(dev); int rc; - unsigned long timeout; + unsigned long time_left; unsigned int good_sockets =3D 0, bad_sockets =3D 0; unsigned long flags; /* Maximum number of entries is 4 */ @@ -265,8 +265,8 @@ static int __maybe_unused tifm_7xx1_resume(struct devic= e *dev_d) if (good_sockets) { fm->finish_me =3D &finish_resume; spin_unlock_irqrestore(&fm->lock, flags); - timeout =3D wait_for_completion_timeout(&finish_resume, HZ); - dev_dbg(&dev->dev, "wait returned %lu\n", timeout); + time_left =3D wait_for_completion_timeout(&finish_resume, HZ); + dev_dbg(&dev->dev, "wait returned %lu\n", time_left); writel(TIFM_IRQ_FIFOMASK(good_sockets) | TIFM_IRQ_CARDMASK(good_sockets), fm->addr + FM_CLEAR_INTERRUPT_ENABLE); --=20 2.43.0 From nobody Fri Feb 13 00:12:46 2026 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F07DC143751 for ; Tue, 4 Jun 2024 21:22:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.117.254.33 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717536178; cv=none; b=bsZRyC+9ultteakw8QJmUxCzP1YRnCrgRr0aKZCAewnO9WfMNGU7LIn8EI5IzN7EH5ksoSCPeg9lzOBvajEQxwzOAdj276sjbvYJpsgMf8bpUMxR9P1xsb+E2mCy3HIqlcKuDTZc6GSVdIxXPpiAAtvlChvxOCVGGa88lkSlmag= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717536178; c=relaxed/simple; bh=DFk9HGUZ1dn/QPKuOhev6jWzX0n9LtYQ4BOE0bxA2m0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MyPtBx8vXlQQzozW9ab6CKO1WXA7bt1A383Ni6emJEERJME/mEwaw3qgMDjc44OtX64QMDblEbiSN0ZHyuOy83cxR44g36eMf3yECtJRTQDVLEvQmh98vNcxIYakpnTxntR2m9ECxEwn2/P0jotpCSx4sWrPF7B2efrBzUfXtN4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com; spf=pass smtp.mailfrom=sang-engineering.com; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b=IJnTxOZx; arc=none smtp.client-ip=194.117.254.33 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sang-engineering.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sang-engineering.com header.i=@sang-engineering.com header.b="IJnTxOZx" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= sang-engineering.com; h=from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; s=k1; bh=SvCvXJcfmWPlEV++5++kUpd9aH8wU2Nv8Sax1bHiMk4=; b=IJnTxO ZxydCmYTevZlBfAC4WX1PuEaCHF8XzKFu58gmnWJ1dclq1I7h5yp37li+TN9TKM+ LQsbWHb6w2UbgCjSTEC3D/inuEM1/U2xT+A7unEraQpBfkc/DmBXmVVWlxT+aV8v 4c4qdQ+4HVn3gSoxtDnURjEnWI86YrfJbIifHJgBfmp3RcX6IgwXUWlpTqgbD4Ck FPy2rekP3vsUjvlQJe3mDvE7QRtCh63ha09jdrFEcnEu2Cbw7hDzzouxCeWt0MOa 2slaZQiDfejiyyDpwD0oXlTIRMul1PR/VGxTkewjYpezQiiWTO6lebD5R9kbZiJE epX1nzBUQHGlVUQA== Received: (qmail 2449499 invoked from network); 4 Jun 2024 23:22:53 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 4 Jun 2024 23:22:53 +0200 X-UD-Smtp-Session: l3s3148p1@dC9/DRcaRN1ehhtB From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: Wolfram Sang , Arnd Bergmann , Greg Kroah-Hartman Subject: [PATCH 4/4] misc: ti-st: st_kim: use 'time_left' variable with wait_for_completion_interruptible_timeout() Date: Tue, 4 Jun 2024 23:22:39 +0200 Message-ID: <20240604212240.4529-5-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240604212240.4529-1-wsa+renesas@sang-engineering.com> References: <20240604212240.4529-1-wsa+renesas@sang-engineering.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There is a confusing pattern in the kernel to use a variable named 'timeout= ' to store the result of wait_for_completion_interruptible_timeout() causing pat= terns like: timeout =3D wait_for_completion_interruptible_timeout(...) if (!timeout) return -ETIMEDOUT; with all kinds of permutations. Use 'time_left' as a variable to make the c= ode self explaining. Signed-off-by: Wolfram Sang --- drivers/misc/ti-st/st_kim.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/misc/ti-st/st_kim.c b/drivers/misc/ti-st/st_kim.c index c4f963cf96f2..ff172cf4614d 100644 --- a/drivers/misc/ti-st/st_kim.c +++ b/drivers/misc/ti-st/st_kim.c @@ -198,7 +198,7 @@ static long read_local_version(struct kim_data_s *kim_g= data, char *bts_scr_name) { unsigned short version =3D 0, chip =3D 0, min_ver =3D 0, maj_ver =3D 0; static const char read_ver_cmd[] =3D { 0x01, 0x01, 0x10, 0x00 }; - long timeout; + long time_left; =20 pr_debug("%s", __func__); =20 @@ -208,11 +208,11 @@ static long read_local_version(struct kim_data_s *kim= _gdata, char *bts_scr_name) return -EIO; } =20 - timeout =3D wait_for_completion_interruptible_timeout( + time_left =3D wait_for_completion_interruptible_timeout( &kim_gdata->kim_rcvd, msecs_to_jiffies(CMD_RESP_TIME)); - if (timeout <=3D 0) { + if (time_left <=3D 0) { pr_err(" waiting for ver info- timed out or received signal"); - return timeout ? -ERESTARTSYS : -ETIMEDOUT; + return time_left ? -ERESTARTSYS : -ETIMEDOUT; } reinit_completion(&kim_gdata->kim_rcvd); /* --=20 2.43.0