From patchwork Thu Jun 2 12:43:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Copeland X-Patchwork-Id: 9149925 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E067A60751 for ; Thu, 2 Jun 2016 12:44:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D11362679B for ; Thu, 2 Jun 2016 12:44:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C5D872824A; Thu, 2 Jun 2016 12:44:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FE8D2679B for ; Thu, 2 Jun 2016 12:44:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753221AbcFBMoJ (ORCPT ); Thu, 2 Jun 2016 08:44:09 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:36017 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752116AbcFBMoH (ORCPT ); Thu, 2 Jun 2016 08:44:07 -0400 Received: by mail-it0-f66.google.com with SMTP id i127so2622512ita.3 for ; Thu, 02 Jun 2016 05:44:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bobcopeland-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=HNrfGUJz+aon5x87VXvax7jX/mn/7G6aVoFjwiv1ob8=; b=DmHEOdINQbh24VvFM3rwSFMeaisFf4pjXp7JKUZVKHqwvQUUhA7NisoP0XSkEMC+tJ AtocU7x39vxDVeGAICBUhUcstn16HbMAS4D2N+ZKmw4i8mtsHtXiscl/CISARDuQvNkk 7KCa1wGSifqg9vL9h+NTjl/mdM7wNarsctwR/R6eahv9QEhWeukKEubO0gDuhFLKe/xv xAyYrS//p1VGJxV7jOfPdftfo097iaMeMsRCGYWyQFg6MSYWc2W1/lXLCGOayinzV/Kc y2IZ4Wm71eFUVUQhu0dkoq3t1ag4EDbauxRAQfW7xSxMj0a9kwPjwJqmtBrfWpxouZYk HXxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HNrfGUJz+aon5x87VXvax7jX/mn/7G6aVoFjwiv1ob8=; b=ITforOt9fgRBWARUlIeGkz5KNG6lvYAxj1Aymg8FWUJidugMGqLY8l2TFXNuWpKi1l NOiiiP9VhGkrrw0fIefjzp4I5y27wga+QBUvLCkKK5sq46v/gtw4H8ihhHTDRyoD/H5B sGxmAY11BYWRr3b0HAJZa+gP7kk9Ieo4NAlSw3rDDvknzuDpp81JCKBXXxAhFDxeM6+A o/R00i7dKTG05smlgY7CiryQ125VGoy05dSyE+82Tbd9q+IHD4Q3uBMXEnrogG1vol4e 5M9sXuYpvq4cQUOwWT/BgThlRYl72rSkWuYVYfgo+Gbpzz6BopyT/0psldJaeK+m4F6Y lVvQ== X-Gm-Message-State: ALyK8tIzql48FA3tFU75KdzMrm5n0bt1Bpgw2bJjf6l6yskD3Kg6htXGAOrF0SOT3i1YCQ== X-Received: by 10.36.41.2 with SMTP id p2mr1627498itp.69.1464871446093; Thu, 02 Jun 2016 05:44:06 -0700 (PDT) Received: from hash (CPE0018e7fe5281-CM18593342f28f.cpe.net.cable.rogers.com. [99.254.238.186]) by smtp.gmail.com with ESMTPSA id p132sm372047iod.29.2016.06.02.05.44.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Jun 2016 05:44:05 -0700 (PDT) Received: from bob by hash with local (Exim 4.84_2) (envelope-from ) id 1b8Ryk-0006Cq-7F; Thu, 02 Jun 2016 08:44:02 -0400 From: Bob Copeland To: linux-wireless@vger.kernel.org Cc: Bob Copeland Subject: [PATCH] ath5k: fix misplaced default label in sifs switch Date: Thu, 2 Jun 2016 08:43:50 -0400 Message-Id: <1464871430-23803-1-git-send-email-me@bobcopeland.com> X-Mailer: git-send-email 2.1.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In this switch statement, the default case does not always assign sifs. In practice, ah->ah_bwmode cannot take values besides the other labels, so this is not an actual problem, but it looks odd and smatch complains thus: ath5k_hw_get_default_sifs() warn: missing break? reassigning 'sifs' Silence the warning by moving default label up a line. Signed-off-by: Bob Copeland --- drivers/net/wireless/ath/ath5k/pcu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath5k/pcu.c b/drivers/net/wireless/ath/ath5k/pcu.c index fc47b70..f23c851 100644 --- a/drivers/net/wireless/ath/ath5k/pcu.c +++ b/drivers/net/wireless/ath/ath5k/pcu.c @@ -219,8 +219,8 @@ ath5k_hw_get_default_sifs(struct ath5k_hw *ah) sifs = AR5K_INIT_SIFS_QUARTER_RATE; break; case AR5K_BWMODE_DEFAULT: - sifs = AR5K_INIT_SIFS_DEFAULT_BG; default: + sifs = AR5K_INIT_SIFS_DEFAULT_BG; if (channel->band == NL80211_BAND_5GHZ) sifs = AR5K_INIT_SIFS_DEFAULT_A; break;