Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1455180lqj; Tue, 4 Jun 2024 01:58:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWjUV6PpoYRjrW/L0tFn74fJviD0xGlRw3RR/n/mrLJGUEfaevC/M4b4lJ0l4Rb2aq/1YGKRiPs9HRAoj/pZnzBFZWQHn+H1VlxaOGB5g== X-Google-Smtp-Source: AGHT+IFaafX5NQIJYRbdZ7+ABPUKj58CdgsAdCanxIG4CCZq44WNSVhLeLoVpQ1/vE+GO9NWlcVM X-Received: by 2002:a17:90b:2393:b0:2b3:5d8a:a13f with SMTP id 98e67ed59e1d1-2c1dc5d9ec9mr9042841a91.47.1717491488804; Tue, 04 Jun 2024 01:58:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717491488; cv=pass; d=google.com; s=arc-20160816; b=oXfql9VMfIDxx0V7R3h9tcKj05XlucStSSCnqlFPmyd8Rzy/GBfjVF07YCjS8VP2hD bLvwG2x5LZO53hi0yaWJXFpNqGfQubJtjDaO7U+RteO37ACco0Trj++hrJAXRTf4mo3U jTwEaZVH1KYzG01VWuA6drADy9VSTg8RqVMKenYZcWGETdvNCVj5fNGhm7WQNx1/p4Qm UovrR2ZdTotQVHu9TA4pVfR4Z3SlNsYTInOS/1O94hW7goNgiVbS1z66WDuxpF301OJl UZXV+glQJyqPWd1E+1n8GJI37HJlbJGkJeMrzxXqjrUtmvjnqBm4kY2FkFhpprMESC3E Al6w== 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=K8Y74bxq8Vt6oO+g2CRhaR+4hRLTmAFC1d2Gvb7Ybcw=; fh=l6X9AqflVTjezPUPKsZ1LMFPH4EvN/Ho001OnU/aG5U=; b=tdp60CHztCT7n7G6AmjJ+FWpBNicX9lKQ4I7r1kmiWY2695Tolm92lMAC02aqJWA1G PKOEIU+ZwqbH5aZ6V1ttpBY4fWR9bGLLgnZSEkHLKoyWXORsJluWYAZa/M1pjpNDrLQi bXMkAl8rDUe/SQsj5zor0sNmowYJK7jpiUkh4FTgNMbqvkVm0o0uHPzwpo5Xgq5IkGHy Ss5gCVdwSVeiGCXiZ4wL7K4aHDtNmQZ/t39O+0NrLny9JT2xtEVidSLF4DUA+Mhj2F6c u0iVbZsSUt4eKAHkOepjSaP0fwkkfD8cEtiGEdqav+VnLELNe+EfffWGC+7ukRn1TYCM Q99w==; 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-8477-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8477-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c1c27a95e9si1723404a91.32.2024.06.04.01.58.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 01:58:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8477-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=realtek.com); spf=pass (google.com: domain of linux-wireless+bounces-8477-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8477-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4034A280FF7 for ; Tue, 4 Jun 2024 08:58:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E29F142E66; Tue, 4 Jun 2024 08:58:04 +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 E4F10BA39; Tue, 4 Jun 2024 08:58:01 +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=1717491484; cv=none; b=SJ9JnBaP2YDOrMCsnzOlKqy/mguvDMn9iBSa33QV4fdlMim/o7uw9FPVr96Db8egl+v3sbdEdGEhRrrdbr4aum3aLIjTgSDJ+UIzxZ3GcwkAH8IXR42Xm2trn7ZBZRKhTH0MscTC5cGHTvXDUSMrbPkL2GL53l06WRAo72wQJJw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717491484; c=relaxed/simple; bh=HOrh0/k/GY955ho0OI2VQWz2TWDiJCI6TBfaMD79sLw=; h=From:To:CC:Subject:Date:Message-ID:References:In-Reply-To: Content-Type:MIME-Version; b=TZ8I2z92as9yovgKKMECiN2Z9XhNxpV9rAQKS3WBBA/8dM5gOzcf9HXP3pcypyaY4xuXtrsGd5oc6K3g7RXcNWSBXvsPQjb/swA/FUezGUtvxpfAx7+tMXfGBMZZeCQgkxRsohByPGWE9MUQij6MbRqpm+I3hPljaU4WY3y9R7A= 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 4548viVjB4136756, 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 4548viVjB4136756 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 4 Jun 2024 16:57:44 +0800 Received: from RTEXDAG02.realtek.com.tw (172.21.6.101) 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 16:57:45 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXDAG02.realtek.com.tw (172.21.6.101) 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 16:57:44 +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 16:57:44 +0800 From: Ping-Ke Shih To: Kalle Valo CC: Wolfram Sang , "linux-kernel@vger.kernel.org" , "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: AQHatZbao81hPkddpUyWjWsMJ9aM8rG2wuZAgACAOVeAAAvlsA== Date: Tue, 4 Jun 2024 08:57:44 +0000 Message-ID: <1483c59d26174defb6fb0886a7375ef0@realtek.com> References: <20240603091541.8367-1-wsa+renesas@sang-engineering.com> <20240603091541.8367-6-wsa+renesas@sang-engineering.com> <1fca9d83960442b0b637d4e9586766bf@realtek.com> <878qzlt9aa.fsf@kernel.org> In-Reply-To: <878qzlt9aa.fsf@kernel.org> Accept-Language: en-US, zh-TW Content-Language: zh-TW 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 Kalle Valo wrote: > Ping-Ke Shih writes: >=20 > > Wolfram Sang wrote: > >> There is a confusing pattern in the kernel to use a variable named 'ti= meout' to > >> store the result of wait_for_completion_timeout() causing patterns lik= e: > >> > >> timeout =3D 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. > >> > >> Signed-off-by: Wolfram Sang > > > > Acked-by: Ping-Ke Shih >=20 > BTW Ping, you can also take it directly to your tree if you want. But if = you > want me to take the patch, then please assign it to me on patchwork (ie. > change 'Delegate to' to 'kvalo'). My preference is to take it to your > tree, smaller risk of concflicts that way, but up to you. I will take it to my tree.=20 Ping-Ke