From: Kalle Valo <kvalo@codeaurora.org>
To: Zheng Yongjun <zhengyongjun3@huawei.com>
Cc: <davem@davemloft.net>, <kuba@kernel.org>,
<ath10k@lists.infradead.org>, <linux-wireless@vger.kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH wireless -next] wireless/ath10k: simplify the return expression of ath10k_ahb_chip_reset()
Date: Thu, 10 Dec 2020 16:37:18 +0200 [thread overview]
Message-ID: <87mtyl4ti9.fsf@codeaurora.org> (raw)
In-Reply-To: <20201210140204.1774-1-zhengyongjun3@huawei.com> (Zheng Yongjun's message of "Thu, 10 Dec 2020 22:02:04 +0800")
Zheng Yongjun <zhengyongjun3@huawei.com> writes:
> Simplify the return expression.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
> ---
> drivers/net/wireless/ath/ath10k/ahb.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/ahb.c b/drivers/net/wireless/ath/ath10k/ahb.c
> index 05a61975c83f..0ba31c0bbd24 100644
> --- a/drivers/net/wireless/ath/ath10k/ahb.c
> +++ b/drivers/net/wireless/ath/ath10k/ahb.c
> @@ -598,16 +598,10 @@ static int ath10k_ahb_prepare_device(struct ath10k *ar)
>
> static int ath10k_ahb_chip_reset(struct ath10k *ar)
> {
> - int ret;
> -
> ath10k_ahb_halt_chip(ar);
> ath10k_ahb_clock_disable(ar);
>
> - ret = ath10k_ahb_prepare_device(ar);
> - if (ret)
> - return ret;
> -
> - return 0;
> + return ath10k_ahb_prepare_device(ar);
> }
>
> static int ath10k_ahb_wake_target_cpu(struct ath10k *ar)
I prefer the original style, easier to add new code to the function.
--
https://patchwork.kernel.org/project/linux-wireless/list/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
prev parent reply other threads:[~2020-12-10 15:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-10 14:02 [PATCH wireless -next] wireless/ath10k: simplify the return expression of ath10k_ahb_chip_reset() Zheng Yongjun
2020-12-10 14:37 ` Kalle Valo [this message]
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=87mtyl4ti9.fsf@codeaurora.org \
--to=kvalo@codeaurora.org \
--cc=ath10k@lists.infradead.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=zhengyongjun3@huawei.com \
/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).