From: Kalle Valo Date: Tue, 30 Apr 2013 20:53:05 +0300 Subject: [ath9k-devel] [PATCH 09/10] ath10k: braces should be used on all arms of this statement In-Reply-To: <20130430175053.5523.85177.stgit@localhost6.localdomain6> References: <20130430175053.5523.85177.stgit@localhost6.localdomain6> Message-ID: <20130430175305.5523.50732.stgit@localhost6.localdomain6> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org A checkpatch warning. Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath10k/ce.c | 3 ++- drivers/net/wireless/ath/ath10k/htc.c | 3 ++- drivers/net/wireless/ath/ath10k/mac.c | 14 ++++++++++---- drivers/net/wireless/ath/ath10k/pci.c | 8 ++++---- drivers/net/wireless/ath/ath10k/pci.h | 3 ++- drivers/net/wireless/ath/ath10k/wmi.c | 3 ++- 6 files changed, 22 insertions(+), 12 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/ce.c b/drivers/net/wireless/ath/ath10k/ce.c index 0de509a..3ef7f39 100644 --- a/drivers/net/wireless/ath/ath10k/ce.c +++ b/drivers/net/wireless/ath/ath10k/ce.c @@ -717,8 +717,9 @@ int ath10k_ce_cancel_send_next(struct ce_state *ce_state, sw_index = CE_RING_IDX_INCR(nentries_mask, sw_index); src_ring->sw_index = sw_index; ret = 0; - } else + } else { ret = -EIO; + } spin_unlock_bh(&ar_pci->ce_lock); diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c index d4c1136..60f471c 100644 --- a/drivers/net/wireless/ath/ath10k/htc.c +++ b/drivers/net/wireless/ath/ath10k/htc.c @@ -60,8 +60,9 @@ static inline void ath10k_htc_recalc_queue(struct ath10k_htc_ep *ep, int delta) if (ep->tx_queue_stopped) { if (ep->tx_queue_len <= ep->max_tx_queue_depth/2) ath10k_htc_wake_queue(ep); - } else if (ep->tx_queue_len >= ep->max_tx_queue_depth) + } else if (ep->tx_queue_len >= ep->max_tx_queue_depth) { ath10k_htc_stop_queue(ep); + } } static inline void ath10k_htc_send_complete_check(struct ath10k_htc_ep *ep, diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index f21189d..b419f8d 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -688,8 +688,9 @@ static void ath10k_ps_iter(void *data, u8 *mac, struct ieee80211_vif *vif) } ar_iter->ret = ret; - } else + } else { psmode = WMI_STA_PS_MODE_DISABLED; + } ar_iter->ret = ath10k_wmi_set_psmode(ar_iter->ar, arvif->vdev_id, psmode); @@ -917,8 +918,10 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar, phymode = MODE_11NG_HT40; else phymode = MODE_11NG_HT20; - } else + } else { phymode = MODE_11G; + } + break; case IEEE80211_BAND_5GHZ: if (sta->ht_cap.ht_supported) { @@ -926,8 +929,10 @@ static void ath10k_peer_assoc_h_phymode(struct ath10k *ar, phymode = MODE_11NA_HT40; else phymode = MODE_11NA_HT20; - } else + } else { phymode = MODE_11A; + } + break; default: break; @@ -1499,8 +1504,9 @@ static void ath10k_tx(struct ieee80211_hw *hw, if (info->control.vif) { arvif = ath10k_vif_to_arvif(info->control.vif); vdev_id = arvif->vdev_id; - } else if (ar->monitor_enabled) + } else if (ar->monitor_enabled) { vdev_id = ar->monitor_vdev_id; + } /* We should disable CCK RATE due to P2P */ if (info->flags & IEEE80211_TX_CTL_NO_CCK_RATE) diff --git a/drivers/net/wireless/ath/ath10k/pci.c b/drivers/net/wireless/ath/ath10k/pci.c index 63516c3..e85d806 100644 --- a/drivers/net/wireless/ath/ath10k/pci.c +++ b/drivers/net/wireless/ath/ath10k/pci.c @@ -1679,9 +1679,9 @@ static void ath10k_pci_fw_interrupt_handler(struct ath10k *ar) ath10k_pci_write32(ar, fw_indicator_address, fw_indicator & ~FW_IND_EVENT_PENDING); - if (ar_pci->started) + if (ar_pci->started) { ath10k_pci_hif_dump_area(ar); - else { + } else { /* * Probable Target failure before we're prepared * to handle it. Generally unexpected. @@ -2222,9 +2222,9 @@ static int ath10k_pci_probe(struct pci_dev *pdev, if (ret) goto err_intr; - if (ath10k_target_ps) + if (ath10k_target_ps) { ath10k_dbg(ATH10K_DBG_PCI, "on-chip power save enabled\n"); - else { + } else { /* Force AWAKE forever */ ath10k_dbg(ATH10K_DBG_PCI, "on-chip power save disabled\n"); ath10k_do_pci_wake(ar); diff --git a/drivers/net/wireless/ath/ath10k/pci.h b/drivers/net/wireless/ath/ath10k/pci.h index 41b4f6f..d2a055a 100644 --- a/drivers/net/wireless/ath/ath10k/pci.h +++ b/drivers/net/wireless/ath/ath10k/pci.h @@ -323,8 +323,9 @@ static inline void ath10k_pci_write32(struct ath10k *ar, u32 offset, spin_unlock_irqrestore(&ar_pci->hw_v1_workaround_lock, irq_flags); - } else + } else { iowrite32(value, addr+offset); + } } static inline u32 ath10k_pci_read32(struct ath10k *ar, u32 offset) diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 195a2e4..3b819c8 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -529,8 +529,9 @@ static void ath10k_wmi_update_tim(struct ath10k *ar, ie[1] += expand_size; ie_len += expand_size; pvm_len += expand_size; - } else + } else { ath10k_warn("tim expansion failed\n"); + } } if (pvm_len > sizeof(arvif->u.ap.tim_bitmap)) {