Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1297672lqj; Mon, 3 Jun 2024 17:35:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVhES8ssHpH0+m0KSfGfSmBsczJN7zpJ1AdDzXmaRbwTMIzxr8tJ6MKJjDddyxbfl3WLPgs1EQDAG1MNFprQKdAimDUNyKMtVqpNlLpJQ== X-Google-Smtp-Source: AGHT+IG6IEEN59hTpNXzOGMMW/7wOvbCD/n6IGjDYNY9l3vF1+qR6CUJPpbLS4o1M9MfhfLgyr34 X-Received: by 2002:ac2:4822:0:b0:520:dc1c:3c5d with SMTP id 2adb3069b0e04-52b896bf720mr6644524e87.42.1717461355827; Mon, 03 Jun 2024 17:35:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717461355; cv=pass; d=google.com; s=arc-20160816; b=hBak6r0TVraStUrFCr9QGL35m3XCJlks5bCTF9AkKcSlP9hcu3IwKuoOecZtvmnDqC q/slffDLz3t0Xs8A/JZPVKzmMoAC+Bj57CjMV1WRcB5domuMLZLqCjmfMFd7mBN8u87H JmYi+x66oTfYmaC1gRkoutjvpnV/Ej7j7oMkRVXJLAFnSQEsRd4UYKLO6zQSIVtBrajv uUQk885p+Xmry1bpGrRLtY3uNHYwL4yvOGjiVs2Ih47aS8YI641sqlgVj6J11cTlHQCp jBzsKa/5Pz8uuFVFdoWqoPuzFz2wYw31GeYxdIsFNMaegCumlodYpt4OIfyAVJ9RvKed sFqw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:cc:to:from; bh=idNfl8sceDpdYvN6O38RDkmJyojaTBr7ym5WL2hhnsg=; fh=k4h0jNXm2QrLqWeFnDxJncD7GSiRba8+2+L2b9axjwg=; b=vSY0xpDPyMXR1iqdA9yx7Ku/nIGCFA0oQq2mak/9yppQR/T/GajbN88D0+gKyWolbL l+UpQAKE5jQ8BQN7hCiyIqOYyX0JbnLIXxvsomZAZ+q29hV5QE0y2ZAEAInRExVDPb+e Q9wx3GvsuKZRtWKRXf5vJ+6d2Rce7DAWEfLXDqS2m/cfar/V081W6rvOolUKx5mN9vY2 sNzsNYemTW5PgjpYEPlvcvo9Fg/77WiOiQtQlYRlJupQ+/NJ+m3Z+kX9Z64jFnoa6yey GSN4qUJePaK6vujRCmRXWGGx3yPQJXwBYPlC4Ez+sJXQoTeTtVQZj0YaesfPdCuJAxWK pkOg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-8450-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8450-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a68b132a9b8si340010966b.791.2024.06.03.17.35.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 17:35:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8450-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-8450-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8450-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D71841F24038 for ; Tue, 4 Jun 2024 00:35:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 041CF818; Tue, 4 Jun 2024 00:35:50 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 305C67FD; Tue, 4 Jun 2024 00:35:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=211.75.126.72 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717461349; cv=none; b=OBj6Bmq3rZ99U4ylTuKkGjbg7xPDTXHBOkesGIwnqv5mJHwRtfp3wpwtPtqcw58fTptYAiH39hYXNFqhaSH4LGr5g1x+nlygOt9gfJR4IHr8A+koDO+fYKWoLAExjWwthUqqQaU92YYb3TPpBwyLG5htfXEiH0FbLYtv7KUUOfQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717461349; c=relaxed/simple; bh=mc3T7X/7KmZ+nx7G2b5CJFKMscc7z4qeRh9L5JZzvb0=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=cOI+k8FWXkPX6cssQnqj5vhHif2f6CATpvvsa+gcsWAeqOD5BbFVCXrSbwZS/Om8AaO5WvtNLRUa76ad+n7YveyGw3IsGxUJNm75woe09kNRCFZqlJyWFvei+toTOyeXMNothlLJSYGriKWD4ItxP6nZtOHpdWfGuCMVsC6Jf5E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com; spf=pass smtp.mailfrom=realtek.com; arc=none smtp.client-ip=211.75.126.72 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=realtek.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=realtek.com X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 4540ZRoR43544825, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36505.realtek.com.tw[172.21.6.25]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 4540ZRoR43544825 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 4 Jun 2024 08:35:27 +0800 Received: from RTEXMBS02.realtek.com.tw (172.21.6.95) by RTEXH36505.realtek.com.tw (172.21.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 4 Jun 2024 08:35:27 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXMBS02.realtek.com.tw (172.21.6.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Tue, 4 Jun 2024 08:35:27 +0800 Received: from RTEXMBS04.realtek.com.tw ([fe80::1a1:9ae3:e313:52e7]) by RTEXMBS04.realtek.com.tw ([fe80::1a1:9ae3:e313:52e7%5]) with mapi id 15.01.2507.035; Tue, 4 Jun 2024 08:35:27 +0800 From: Ping-Ke Shih To: Wolfram Sang , "linux-kernel@vger.kernel.org" CC: Kalle Valo , "linux-wireless@vger.kernel.org" Subject: RE: [PATCH 5/6] wifi: rtw89: use 'time_left' variable with wait_for_completion_timeout() Thread-Topic: [PATCH 5/6] wifi: rtw89: use 'time_left' variable with wait_for_completion_timeout() Thread-Index: AQHatZbao81hPkddpUyWjWsMJ9aM8rG2wuZA Date: Tue, 4 Jun 2024 00:35:27 +0000 Message-ID: <1fca9d83960442b0b637d4e9586766bf@realtek.com> References: <20240603091541.8367-1-wsa+renesas@sang-engineering.com> <20240603091541.8367-6-wsa+renesas@sang-engineering.com> In-Reply-To: <20240603091541.8367-6-wsa+renesas@sang-engineering.com> Accept-Language: en-US, zh-TW Content-Language: zh-TW x-kse-serverinfo: RTEXMBS02.realtek.com.tw, 9 x-kse-antispam-interceptor-info: fallback x-kse-antivirus-interceptor-info: fallback Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-KSE-AntiSpam-Interceptor-Info: fallback Wolfram Sang wrote: > There is a confusing pattern in the kernel to use a variable named 'timeo= ut' to > store the result of wait_for_completion_timeout() causing patterns like: >=20 > timeout =3D wait_for_completion_timeout(...) > if (!timeout) return -ETIMEDOUT; >=20 > with all kinds of permutations. Use 'time_left' as a variable to make the= code > self explaining. >=20 > Signed-off-by: Wolfram Sang Acked-by: Ping-Ke Shih