linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Brian Norris <briannorris@chromium.org>
Cc: Youghandhar Chintala <youghand@codeaurora.org>,
	kuabhs@chromium.org,
	linux-wireless <linux-wireless@vger.kernel.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	ath10k <ath10k@lists.infradead.org>,
	Doug Anderson <dianders@chromium.org>,
	Rakesh Pillai <pillair@codeaurora.org>
Subject: Re: [PATCH v2] ath10k: skip the wait for completion to recovery in shutdown path
Date: Mon, 07 Dec 2020 18:12:38 +0200	[thread overview]
Message-ID: <87y2i9egsp.fsf@codeaurora.org> (raw)
In-Reply-To: <CA+ASDXOvnfETrKs2ZbayZsRkUEpUbaeMGRkZNRCXa=M28HHE-w@mail.gmail.com> (Brian Norris's message of "Tue, 1 Dec 2020 11:35:44 -0800")

Brian Norris <briannorris@chromium.org> writes:

> On Thu, Nov 26, 2020 at 9:16 AM Youghandhar Chintala
> <youghand@codeaurora.org> wrote:
>> --- a/drivers/net/wireless/ath/ath10k/snoc.c
>> +++ b/drivers/net/wireless/ath/ath10k/snoc.c
>> @@ -1790,9 +1790,6 @@ static int ath10k_snoc_remove(struct platform_device *pdev)
>>
>>         reinit_completion(&ar->driver_recovery);
>>
>> -       if (test_bit(ATH10K_SNOC_FLAG_RECOVERY, &ar_snoc->flags))
>> -               wait_for_completion_timeout(&ar->driver_recovery, 3 * HZ);
>
> Hmm, this is the only instance of waiting for this completion, which
> means that after this patch, 'ar->driver_recovery' is doing exactly
> nothing. Should you instead just remove it completely?
>
> Also, if your patch is correct, it seems like the completion was never
> needed in the first place. You should probably address such a claim in
> the commit message; is there truly no need to wait here? Or was there
> some purpose here, but that purpose was accomplished some other way?
> Or was there a purpose, and that purpose was misguided? It feels to me
> like it is indeed correct to remove this (shutdown should be performed
> promptly; we don't need to delay it just to try to "finish
> recovering"), but it's your job to convince the reader.

Exactly what I was thinking as well. To me this patch was just looks
racy and all the commit log says that it's "unwanted delay".

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

  reply	other threads:[~2020-12-07 16:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-26 17:15 [PATCH v2] ath10k: skip the wait for completion to recovery in shutdown path Youghandhar Chintala
2020-12-01 19:35 ` Brian Norris
2020-12-07 16:12   ` Kalle Valo [this message]
2020-12-08  8:25 ` Sai Prakash Ranjan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y2i9egsp.fsf@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=ath10k@lists.infradead.org \
    --cc=briannorris@chromium.org \
    --cc=dianders@chromium.org \
    --cc=kuabhs@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=pillair@codeaurora.org \
    --cc=youghand@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).