From patchwork Fri Aug 22 13:18:00 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bob Copeland X-Patchwork-Id: 4763781 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D08869F37E for ; Fri, 22 Aug 2014 13:18:29 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C5AAC20173 for ; Fri, 22 Aug 2014 13:18:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A15EF20160 for ; Fri, 22 Aug 2014 13:18:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756190AbaHVNSW (ORCPT ); Fri, 22 Aug 2014 09:18:22 -0400 Received: from mail-ig0-f171.google.com ([209.85.213.171]:59300 "EHLO mail-ig0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756108AbaHVNSV (ORCPT ); Fri, 22 Aug 2014 09:18:21 -0400 Received: by mail-ig0-f171.google.com with SMTP id l13so14897078iga.10 for ; Fri, 22 Aug 2014 06:18:20 -0700 (PDT) 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=tqG5Q3LHvclDyWbsG1x7Dk3vFcgKKiKFC1JFRydc31s=; b=mJQlMkt6uoe8ykSB55cMPFSBAcFbbUZg8mOX7sXtJPqiawHNrqyAbAfYyMj+h362kI KN5RraCCb1g+YBOOCODW8EGYbZSjZweFQMgAD2mB6xQw05n9aDifeJOqaZ59kn83ld11 0znZWixeNkb53YQwswKGo0FRpMyoSg7VoiCSjHhEKmsgxJWlKjmaQXfUOT9MVSuOg1gV o38uyqoG8WP87OO9kn9UzZB32zF0t/QTYc78SzUjGnmksA7jU2afU3tHL9r7GVs7zexF SPuQs6aiONkJY6/ppiQpUZKeVaQ7yHxxTFWGbYR+gKTKmwJB/GPYb4dst62YLPtdNwjF Kqpg== X-Gm-Message-State: ALoCoQmLSc4jVxxczeUS3EBi6HL+5xQkccfnvqAFDpsWkg2NcIcDRf1cGlEjRHmq1S/0mPkJFiw4 X-Received: by 10.50.88.37 with SMTP id bd5mr5299982igb.1.1408713500710; Fri, 22 Aug 2014 06:18:20 -0700 (PDT) Received: from hash ([2001:470:1d:6db:230:48ff:fe9d:9c89]) by mx.google.com with ESMTPSA id bd5sm37414730igb.16.2014.08.22.06.18.18 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 22 Aug 2014 06:18:19 -0700 (PDT) Received: from bob by hash with local (Exim 4.80) (envelope-from ) id 1XKojF-00024J-0w; Fri, 22 Aug 2014 09:18:05 -0400 From: Bob Copeland To: linville@tuxdriver.com, mickflemm@gmail.com Cc: ath5k-devel@lists.ath5k.org, linux-wireless@vger.kernel.org, Bob Copeland Subject: [PATCH 1/3] ath5k: drop useless comparison Date: Fri, 22 Aug 2014 09:18:00 -0400 Message-Id: <1408713482-7917-1-git-send-email-me@bobcopeland.com> X-Mailer: git-send-email 1.7.10.4 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.6 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 rxs->rate_idx is unsigned, so it will always be >= 0. Found by Coverity. Signed-off-by: Bob Copeland --- John & Nick, This and the next two patches are some simple cleanups from static checkers, but no actual bugs here, so they can wait for 3.18. drivers/net/wireless/ath/ath5k/base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index ef35da8..03ab134 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c @@ -1417,7 +1417,7 @@ ath5k_receive_frame(struct ath5k_hw *ah, struct sk_buff *skb, break; } - if (rxs->rate_idx >= 0 && rs->rs_rate == + if (rs->rs_rate == ah->sbands[ah->curchan->band].bitrates[rxs->rate_idx].hw_value_short) rxs->flag |= RX_FLAG_SHORTPRE;