linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath5k: fix misplaced default label in sifs switch
@ 2016-06-02 12:43 Bob Copeland
  2016-06-14 12:18 ` Kalle Valo
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Copeland @ 2016-06-02 12:43 UTC (permalink / raw)
  To: linux-wireless; +Cc: Bob Copeland

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 <me@bobcopeland.com>
---
 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;
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: ath5k: fix misplaced default label in sifs switch
  2016-06-02 12:43 [PATCH] ath5k: fix misplaced default label in sifs switch Bob Copeland
@ 2016-06-14 12:18 ` Kalle Valo
  0 siblings, 0 replies; 2+ messages in thread
From: Kalle Valo @ 2016-06-14 12:18 UTC (permalink / raw)
  To: Bob Copeland; +Cc: linux-wireless, Bob Copeland

Bob Copeland <me@bobcopeland.com> wrote:
> 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 <me@bobcopeland.com>

Thanks, 1 patch applied to ath-next branch of ath.git:

deb85bb1dadf ath5k: fix misplaced default label in sifs switch

-- 
Sent by pwcli
https://patchwork.kernel.org/patch/9149925/


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-14 12:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-02 12:43 [PATCH] ath5k: fix misplaced default label in sifs switch Bob Copeland
2016-06-14 12:18 ` Kalle Valo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).