From: Kalle Valo <kvalo@codeaurora.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: kernel-janitors@vger.kernel.org,
Carl Huang <cjhuang@codeaurora.org>,
linux-wireless@vger.kernel.org, ath11k@lists.infradead.org
Subject: Re: [PATCH 1/2] ath11k: Fix error code in ath11k_core_suspend()
Date: Wed, 16 Dec 2020 10:57:58 +0000 [thread overview]
Message-ID: <87czzaxbk9.fsf@codeaurora.org> (raw)
In-Reply-To: <87h7omxgqs.fsf@codeaurora.org> (Kalle Valo's message of "Wed, 16 Dec 2020 11:06:03 +0200")
Kalle Valo <kvalo@codeaurora.org> writes:
> Dan Carpenter <dan.carpenter@oracle.com> writes:
>
>> The "if (!ret)" condition is inverted and it should be "if (ret)". It
>> means that we return success when we had intended to return an error
>> code.
>>
>> Fixes: d1b0c33850d2 ("ath11k: implement suspend for QCA6390 PCI devices")
>> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>> ---
>> drivers/net/wireless/ath/ath11k/core.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/net/wireless/ath/ath11k/core.c b/drivers/net/wireless/ath/ath11k/core.c
>> index b97c38b9a270..350b7913622c 100644
>> --- a/drivers/net/wireless/ath/ath11k/core.c
>> +++ b/drivers/net/wireless/ath/ath11k/core.c
>> @@ -185,7 +185,7 @@ int ath11k_core_suspend(struct ath11k_base *ab)
>> ath11k_hif_ce_irq_disable(ab);
>>
>> ret = ath11k_hif_suspend(ab);
>> - if (!ret) {
>> + if (ret) {
>> ath11k_warn(ab, "failed to suspend hif: %d\n", ret);
>> return ret;
>> }
>
> I suspect I created these bugs while cleaning up the patches. But I
> don't get how I missed them in testing, that's a mystery to me.
The warning was there:
[ 297.186612] ath11k_pci 0000:06:00.0: failed to suspend hif: 0
But I had missed that because suspend was still working due to
ath11k_core_suspend() returning 0. I'll update the commit log and
mention about that spurious warning.
Thank you Dan, this was a very good catch! In the future I'll grep my
logs more carefully, updated my scripts already.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
next prev parent reply other threads:[~2020-12-16 10:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-16 8:31 [PATCH 1/2] ath11k: Fix error code in ath11k_core_suspend() Dan Carpenter
2020-12-16 8:32 ` [PATCH 2/2] ath11k: Fix ath11k_pci_fix_l1ss() Dan Carpenter
2020-12-16 11:01 ` Kalle Valo
2020-12-16 9:06 ` [PATCH 1/2] ath11k: Fix error code in ath11k_core_suspend() Kalle Valo
2020-12-16 10:57 ` Kalle Valo [this message]
2020-12-17 6:48 ` Kalle Valo
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=87czzaxbk9.fsf@codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=ath11k@lists.infradead.org \
--cc=cjhuang@codeaurora.org \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-wireless@vger.kernel.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).