lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Thu, 10 Dec 2020 16:37:18 +0200
From:   Kalle Valo <kvalo@...eaurora.org>
To:     Zheng Yongjun <zhengyongjun3@...wei.com>
Cc:     <davem@...emloft.net>, <kuba@...nel.org>,
        <ath10k@...ts.infradead.org>, <linux-wireless@...r.kernel.org>,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH wireless -next] wireless/ath10k: simplify the return expression of ath10k_ahb_chip_reset()

Zheng Yongjun <zhengyongjun3@...wei.com> writes:

> Simplify the return expression.
>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@...wei.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ