* [PATCH wireless -next] wireless/ath10k: simplify the return expression of ath10k_ahb_chip_reset()
@ 2020-12-10 14:02 Zheng Yongjun
2020-12-10 14:37 ` Kalle Valo
0 siblings, 1 reply; 2+ messages in thread
From: Zheng Yongjun @ 2020-12-10 14:02 UTC (permalink / raw)
To: kvalo, davem, kuba, ath10k, linux-wireless
Cc: netdev, linux-kernel, Zheng Yongjun
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)
--
2.22.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH wireless -next] wireless/ath10k: simplify the return expression of ath10k_ahb_chip_reset()
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
0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2020-12-10 14:37 UTC (permalink / raw)
To: Zheng Yongjun; +Cc: davem, kuba, ath10k, linux-wireless, netdev, linux-kernel
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-10 15:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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).