From patchwork Thu Oct 11 08:09:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 10636257 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E25FC679F for ; Thu, 11 Oct 2018 08:10:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CECEB2B12E for ; Thu, 11 Oct 2018 08:10:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C29012B134; Thu, 11 Oct 2018 08:10:05 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5B2C22B12E for ; Thu, 11 Oct 2018 08:10:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=PjgSgzBAEj7zFVWX3VeF5v0SRH8D8a06wb5H7EOxxFM=; b=Q4fdrztHrN23ks dqma76JgbxEykz4BlJGwNT57vvk/zEM+lFKN2QHIsfu9SyJFwqTYF6Is+IctCM+Xraujf6V0uoHVa QMeJIbv9InOOVNoUGPC+BjSFxUYrs+mrXIUpOxElGHptzhwGhknr11iBKuASJ7wpqIxEYZOrjWjyB rDBrnW8IbMKkmSYNCu0TAsXTiL9g7vkvwBmWS6gt/BAGQGxSrz99tVc4CQrXAHLN/SpaVWtaKyNMJ qz6AdB3gPdhH8I4QHnyl0h7GTX6n4OUat+3yVK3GWMLjxLk6MsJhp+QgoSOCPhgucutHLvLHDfOE1 rP91/RmhbzrRMzRvQuqg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gAW2j-0001QX-1F; Thu, 11 Oct 2018 08:10:01 +0000 Received: from aserp2120.oracle.com ([141.146.126.78]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gAW2T-0001NQ-Id for ath10k@lists.infradead.org; Thu, 11 Oct 2018 08:09:57 +0000 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w9B88xkn066811; Thu, 11 Oct 2018 08:09:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : mime-version : content-type; s=corp-2018-07-02; bh=0jVr7p1NjnICzg6i3c4jxhIk7n8b4knkgV7DpwFACvI=; b=YF7rhYWrzNhrShNLMzZb/azPoSkQ2z3QUW3wo2gWn6S7d05iDU5z35XQ1ykw276DcanB 13XWXN8LfAUjDfQrjHHPJlNCDqNs+kBuqherR6jKZoA5blWcPcpWgjIFuzgiaYEJ5m5K 0lJTjlpmKMEdCy4JdbQ7rmVcuS9EMykQ7leAfbRqqJ+mnRq+q+Y7KrYwyFOOXgAltXye yYHEgnwqk44n+aTj9U0YKbRn0wgxi4n/JRBoWUApAw1l4jmlmfsiuaFBnMhta5cZgyiA OU1DGzeC736k+6mJzed+N0VzL+Nli/vUnMTcGx7xvhMmcdsPHOp+nnW+OgeZTYIRZWjm 7w== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2120.oracle.com with ESMTP id 2mxn0qagxn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 11 Oct 2018 08:09:32 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w9B89QkE009255 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 11 Oct 2018 08:09:26 GMT Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w9B89Q7t026365; Thu, 11 Oct 2018 08:09:26 GMT Received: from mwanda (/197.232.248.111) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 11 Oct 2018 08:09:26 +0000 Date: Thu, 11 Oct 2018 11:09:20 +0300 From: Dan Carpenter To: Kalle Valo , Anilkumar Kolli Subject: [PATCH] ath10k: htt: remove some dead code Message-ID: <20181011080920.GA15131@mwanda> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email haha only kidding User-Agent: Mutt/1.10.1 (2018-07-13) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9042 signatures=668706 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810110081 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181011_010945_733900_F4A8DD52 X-CRM114-Status: GOOD ( 11.58 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, linux-wireless@vger.kernel.org, ath10k@lists.infradead.org Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP We added an unnecessary condition here in commit a904417fc876 ("ath10k: add extended per sta tx statistics support"). "legacy_rate_idx" is a u8 so it can't be negative. The caller doesn't pass negatives either. I have deleted this code. Signed-off-by: Dan Carpenter --- I didn't use the Fixes tag because it's not really a bug. diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index f2405258a6d3..13717a287848 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -2680,8 +2680,6 @@ ath10k_accumulate_per_peer_tx_stats(struct ath10k *ar, STATS_OP_FMT(RETRY).ht[1][ht_idx] += pstats->retry_pkts; } else { mcs = legacy_rate_idx; - if (mcs < 0) - return; STATS_OP_FMT(SUCC).legacy[0][mcs] += pstats->succ_bytes; STATS_OP_FMT(SUCC).legacy[1][mcs] += pstats->succ_pkts;