Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1299978

Re: [PATCH 2/2] net-ath9k_htc: Replace a variable initialisation by an assignment in ath9k_htc_set_channel()

From Oleksij Rempel <linux@rempel-privat.de>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] net-ath9k_htc: Replace a variable initialisation by an assignment in ath9k_htc_set_channel()
Date 2016-01-01 20:20 +0100
Message-ID <qMdp0-6tw-17@gated-at.bofh.it> (permalink)
References <qEuGl-43C-5@gated-at.bofh.it> <qMcCC-5Xq-21@gated-at.bofh.it> <qMcCC-5Xq-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Am 01.01.2016 um 19:25 schrieb SF Markus Elfring:
> From: Markus Elfring <elfring@users.sourceforge.net>
> Date: Fri, 1 Jan 2016 19:09:32 +0100
> 
> Replace an explicit initialisation for one local variable at the beginning
> by a conditional assignment.
> 
> Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
> ---
>  drivers/net/wireless/ath/ath9k/htc_drv_main.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
> index a680a97..30bd59e 100644
> --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
> +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
> @@ -246,7 +246,7 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv,
>  	struct ieee80211_conf *conf = &common->hw->conf;
>  	bool fastcc;
>  	struct ieee80211_channel *channel = hw->conf.chandef.chan;
> -	struct ath9k_hw_cal_data *caldata = NULL;
> +	struct ath9k_hw_cal_data *caldata;
>  	enum htc_phymode mode;
>  	__be16 htc_mode;
>  	u8 cmd_rsp;
> @@ -274,10 +274,7 @@ static int ath9k_htc_set_channel(struct ath9k_htc_priv *priv,
>  		priv->ah->curchan->channel,
>  		channel->center_freq, conf_is_ht(conf), conf_is_ht40(conf),
>  		fastcc);
> -
> -	if (!fastcc)
> -		caldata = &priv->caldata;
> -
> +	caldata = fastcc ? NULL : &priv->caldata;
>  	ret = ath9k_hw_reset(ah, hchan, caldata, fastcc);
>  	if (ret) {
>  		ath_err(common,
> 

Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>

-- 
Regards,
Oleksij

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] net-ath9k_htc: Fine-tuning for two function  implementations SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 19:30 +0100
  [PATCH 2/2] net-ath9k_htc: Replace a variable initialisation by an  assignment in ath9k_htc_set_channel() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 19:30 +0100
    Re: [PATCH 2/2] net-ath9k_htc: Replace a variable initialisation by  an assignment in ath9k_htc_set_channel() Oleksij Rempel <linux@rempel-privat.de> - 2016-01-01 20:20 +0100
  [PATCH 1/2] net-ath9k_htc: Delete an unnecessary variable  initialisation in ath9k_hif_usb_rx_stream() SF Markus Elfring <elfring@users.sourceforge.net> - 2016-01-01 19:30 +0100
    Re: [PATCH 1/2] net-ath9k_htc: Delete an unnecessary variable  initialisation in ath9k_hif_usb_rx_stream() Oleksij Rempel <linux@rempel-privat.de> - 2016-01-01 20:20 +0100

csiph-web