Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp389238lqp; Wed, 12 Jun 2024 05:01:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXQtybsAqh3OIcSdIJuNDagDAT4HBwKGGJ+8mCf9htdWsthXgLYqoHb31IQLa3VOS37X3VqLx1X2PgYqdazdJRTjkQ+bCvcBPDX0AEwkA== X-Google-Smtp-Source: AGHT+IGtBaAqqn+B23ubtzMOWvuzFPj1FF3IsUHa8SlbxrlelhPNe2sGPL1gjmdoyTtU19fq7Kz7 X-Received: by 2002:a05:620a:628f:b0:795:5750:cef7 with SMTP id af79cd13be357-797f4ee2560mr230448785a.36.1718193692945; Wed, 12 Jun 2024 05:01:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718193692; cv=pass; d=google.com; s=arc-20160816; b=qNk9jpBvLZI5U5XgDaHFJCKRTqdsR98yx9o9EzZmyssEoFTCFYNrPAF4vZ5yPBPfVF uVvt0/k9eWyT0peNuxAxaU1FJhVeE0bBTygGAfSQT2bzF5WlZjoFJ7KtQn/F4ugKMy/l hNyYbTP9oeIi5hr2NtTxtfHSzE9I//OhISQILCSXfHp5jjm14QJwEwaTbjl4YgwEqldS MNm1xtZ2iNZ/WZeDH5gzxE8r7gCwBj4NZ5e7BuIGJNntChP7RL6rVM51dw7kZXxsRR11 8s/Fj8eykQUtm2ljuvf0lGz7swPi2+UZsH+5XNIaogj7qYc1qQDeomFxtHTpTr9z1dvM I0RA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:message-id:user-agent:cc:to:references:in-reply-to:from :subject:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:dkim-signature; bh=KuBZ1kcyuDdBn13hHW0Tcxvl6J5y5Cot36uYCAcdbQk=; fh=ghh7IJN9LQ+mmAv91jDQc/1Kdk2HWsDKQoAe9j8kK5I=; b=FIiBO7icYSIrEq02ArkSJeJaHb2fRAeJI+Mg4zB/gT4KnrtU0bAaemJ+W0TigLuxoo U/jVs/GAo+cwLixZ4W1klvdUrDAba5TScb7e0tuTrK3V3PI9La8jPrskIYLMRiw2Vf8L czk/eUfdZa2uYVjRbpA2FzRv1lgwS8wQ/t92JrATu3ozWVP3PtM5bztg4G6UrOZu1jI5 EA6Zfd627cEaCvxWrIRgvKehstzeiFtoNwFnGi+KbatzwJQmyLXODdT5iM+yBFXPLdcx 5F54eHt8yahe2dPwiSDthsWfnBGia+dKcvfKQvJ2pcPt3Ocz3RDbkRBTN8udvMWMJMLi FcIQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=plBA+azh; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-8856-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8856-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-7955dfb6f97si894439485a.507.2024.06.12.05.01.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 05:01:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-8856-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=plBA+azh; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-8856-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-8856-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 848F31C21103 for ; Wed, 12 Jun 2024 12:01:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E04BF16D306; Wed, 12 Jun 2024 12:01:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="plBA+azh" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B57F45B5B6; Wed, 12 Jun 2024 12:01:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718193688; cv=none; b=MrqV8WSy8dn2GVz/jdJ04TCrkj8y54Tk0OmTQuQ9qJxEcEYvBIOeIIiJyTR3E8kR5/+INRPWHgQXetA1T8GZ+d0DIv/+gXKCqdbi4yX/fAjcrSsF9UgoD3ngYHFb8Xt7/NkX8yoG0OKqHiFdPWqDy3T9raayoZZBiEaKC1WhzPw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718193688; c=relaxed/simple; bh=Tsv48oPtlgTHvx9V3xuPXgrjcGCvx5oPY+03wCrBLEY=; h=Content-Type:MIME-Version:Subject:From:In-Reply-To:References:To: Cc:Message-ID:Date; b=aSt6Kaw4l/FBz5qLk7xXAF+2Fb3iWdiGgqpAsREHA52K8WspNkBF+Nbt6iYFqiNgMFZ0SsxaxNXDaH+RoAymEwBge0RIumyRQy2EHfAmxQisL7yoCpXBwJyk3K+RUbF7YJDZvwyXSo1jFSj1E0A6NN0Ydir/aODsKfQcG/gABAM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=plBA+azh; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D1C11C3277B; Wed, 12 Jun 2024 12:01:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1718193688; bh=Tsv48oPtlgTHvx9V3xuPXgrjcGCvx5oPY+03wCrBLEY=; h=Subject:From:In-Reply-To:References:To:Cc:Date:From; b=plBA+azhUxAd+ard8rlBITJU9CNxUf3NphVbg3hPOtXGvTdlhRXdinrNQEpQJJ5yk ICHrhCEz1pyGznF2m2oeCkiGMVBHVaB4aiufbin9W55/7TsZxl0nK9NUKAUrtZuxhU KTug8AMd7s8cmYAmyBe2E0Hlu9Mng2il8mj67zmFHrG5Axx527Fa8revTlGPeK7zSW HU2iBuWUtVt2Sa2Jl7R/Bzvmhw7b71rXASKG8fQR6PfRSYmzo8snAb1RYFjNhZeM0v qcb7gS6d/CEplW0Zn8Bd52ZaPci/c7o1uB9tT6s5XD4nvZ8KAOQMzOSzJpC6C135/y y0Um1IfNWo18g== Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [PATCH 2/6] wifi: brcmfmac: use 'time_left' variable with wait_event_timeout() From: Kalle Valo In-Reply-To: <20240603091541.8367-3-wsa+renesas@sang-engineering.com> References: <20240603091541.8367-3-wsa+renesas@sang-engineering.com> To: Wolfram Sang Cc: linux-kernel@vger.kernel.org, Wolfram Sang , Arend van Spriel , linux-wireless@vger.kernel.org, brcm80211@lists.linux.dev, brcm80211-dev-list.pdl@broadcom.com User-Agent: pwcli/0.1.1-git (https://github.com/kvalo/pwcli/) Python/3.11.2 Message-ID: <171819368496.3856519.10394049739413295100.kvalo@kernel.org> Date: Wed, 12 Jun 2024 12:01:26 +0000 (UTC) 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. > > Fix to the proper variable type 'long' while here. > > Signed-off-by: Wolfram Sang > Acked-by: Arend van Spriel 4 patches applied to wireless-next.git, thanks. 158d5a1b3caa wifi: brcmfmac: use 'time_left' variable with wait_event_timeout() 0c0668813cc0 wifi: mwl8k: use 'time_left' variable with wait_for_completion_timeout() a37f6947ff07 wifi: p54: use 'time_left' variable with wait_for_completion_interruptible_timeout() a2ead3445a63 wifi: zd1211rw: use 'time_left' variable with wait_for_completion_timeout() -- https://patchwork.kernel.org/project/linux-wireless/patch/20240603091541.8367-3-wsa+renesas@sang-engineering.com/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches