From patchwork Fri Jan 1 18:25:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: SF Markus Elfring X-Patchwork-Id: 7939911 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8F8869F387 for ; Fri, 1 Jan 2016 18:25:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BCF3D203F7 for ; Fri, 1 Jan 2016 18:25:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EBCAE203E9 for ; Fri, 1 Jan 2016 18:25:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752503AbcAASZL (ORCPT ); Fri, 1 Jan 2016 13:25:11 -0500 Received: from mout.web.de ([212.227.17.12]:58042 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752487AbcAASZI (ORCPT ); Fri, 1 Jan 2016 13:25:08 -0500 Received: from [192.168.1.2] ([77.182.63.9]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0McWj6-1aWbEd0p60-00Hitl; Fri, 01 Jan 2016 19:25:03 +0100 Subject: [PATCH 2/2] net-ath9k_htc: Replace a variable initialisation by an assignment in ath9k_htc_set_channel() To: ath9k-devel@lists.ath9k.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, ath9k-devel@qca.qualcomm.com, Kalle Valo References: <566ABCD9.1060404@users.sourceforge.net> <5686C390.5060600@users.sourceforge.net> Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall From: SF Markus Elfring Message-ID: <5686C47E.1040906@users.sourceforge.net> Date: Fri, 1 Jan 2016 19:25:02 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <5686C390.5060600@users.sourceforge.net> X-Provags-ID: V03:K0:iM1ZkXXDSzFlGQ2Nn+i1oV0iNa27+9L2+haniq12K/1MJRkB22l G401MDyQenh+UncIL+5UYajtRmwKArF/ey8IXhPNRrGgAD6oO9YoiwiwbUIX8iKtAnN2d4G En5dTeOiOjF/+zIbCl7BxP085/iF0TXmz86ySv5BoDxGSd7atFwyIPs/h2iVn9FS9sa5SKL K0bppCfCWseXgHRJDX3qw== X-UI-Out-Filterresults: notjunk:1; V01:K0:joONvWNKdFM=:N0yIIt1pVfEYaeVuuUMDDe 0OpWL2Mgt9cWPxpSAgKzdcY5IScfkPEt1g2mYNuWMRalWX4Xd0G4sOxOA+EK/uhTH6RAj0ZCb 86CblYQfLogm1zM9nER6NV8n+KG4VYfXjgizdVGYF3V9TK/2ZfprXKVKd8ilLOEapClI2AEmE t7pEe2m5JlPAneJaOgY1fBYlEoZYR/x0+8oFdo7j2cu7nKXlriydrwkFtZRno+e6FJ+VtScj4 I9vPT+c/6R4eTBDcTpIzks8pk6zgaN3d+MezLjzpx7CNrksQlwUrrA31MUESFvC+khzjjU0w7 Zi6huxmry7O82jOZBX8lxYPfkpd+qr00IeWo7YMyRz246EZ2Ib5tJlrBdk2xzBYIsR7c5vSSl cfpWUDG+6d7ngIVFKwoKk1e0kaAgUBlWZPwG5TmWruNlg14xBGhNNzC+VQUi9hiC81E2irWau Gx5nXcb9RytL7nHu3BVrSw8ZsF0CNPOMolEDf65MFNKl8nqYHheDiUxKZDxu2QkZ8jbG7r5mK xVQ7EDGJDVBfL3Crs2mDPWOQuFc2uNjMIY2S+A0GoGaS+FgF9/luA58dfTI9+7u9+Jop6Sehm Iea4mvftvG8f8GCHxvQDU+3PIE8UDP7xiCRbw90kJ8irugRlZuclOoI2VmMjsvyrU4E6uPV9b jXc2ICqo/rGAHaGug24L0V/bAGm4rMB7xpHfH2CafCUyPz1h9i5SJBqx0McR+bfh2AAVkvRop F4ytwF7hCSeKZzPOBUVS0eySR/Qtret1oCb0aFvYpRbfNg1Cv1vV4FnZXbjUUl/URnPm2NQy7 YSHrwm8 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Markus Elfring 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 Reviewed-by: Oleksij Rempel Reviewed-by: Julian Calaby --- 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,