Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1654590ybb; Thu, 26 Mar 2020 05:02:18 -0700 (PDT) X-Google-Smtp-Source: ADFU+vurCDKJcfolUGIq8qYcaCqx4i5mbmq5cz0YigNqmThPlixcoUUXR/BxbZLRnuo0A1SMdwrk X-Received: by 2002:a9d:6b16:: with SMTP id g22mr6049324otp.37.1585224137815; Thu, 26 Mar 2020 05:02:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585224137; cv=none; d=google.com; s=arc-20160816; b=hLzMBZO9O9jD9uAJOdnMsS+oFQ7vjXJkcDgoCUmihSk7Jza9UudKIoe9yyDF2CWdtI y+LLGRzjEd3QTeSOmTz/JPgwASmboNRuCU/OQ4yWzl+PYOOc6wQGa50zN9HaZeiGBw3A KQOOCBZ6v8IjBoFpY1ifD8ayya/15+tjgqwNCSVirVA7gDzY7K2GtoeGrtYfCZS8+ZiO QXUIWfKcCj5chuCWv4vOaCXMrKYc6fimAwKR/G36rVetVsFSDQhGwXeBYqBSb81szl5b Vxqf3b63Up4KgtcnwJY5ZXuOCR44K/0Y+rX6aq+hSfSk9Wor0HVsRurdE7OxsarefMox IFoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:cc:to:from; bh=ofsJHf3XPLFG+U2iDHP+Um8HrQxLX/2EZ6XhLaGJIqs=; b=eZsOZOQKM0C/Nm7oJFiX/n1cdQCLbqvpf/Exdc+bPwKz0EYnVkOR8v11ByT9BxOeF/ HK0wREWSLXnDrc1S5m2i1rDRdfc1v2hZWUlI69s1qi3aF5J0RlJHUMTDglqgZv2NhrP8 kRNog7S3byIUeWrPzOalMgwc9eWbkG1SK7FUcxfEq4UNJ8MmxlFYCvDl+2XJsejpP+nN uLxUXG41TqweDFNOjqZYEVGbNGAu6qb9C//MTrIgEffiE5kfs1WIRsGGVakZCo/gt4IB NrV0az04Uunp2b5f69ytP/0YMKxkre6kFD1dl52YebvftQtR1lkKCwEzb2i3Ac2JQZ8T IcOA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d12si869351oom.31.2020.03.26.05.01.53; Thu, 26 Mar 2020 05:02:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728202AbgCZMBH (ORCPT + 99 others); Thu, 26 Mar 2020 08:01:07 -0400 Received: from paleale.coelho.fi ([176.9.41.70]:44140 "EHLO farmhouse.coelho.fi" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728181AbgCZMBF (ORCPT ); Thu, 26 Mar 2020 08:01:05 -0400 Received: from 91-156-6-193.elisa-laajakaista.fi ([91.156.6.193] helo=redipa.ger.corp.intel.com) by farmhouse.coelho.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jHRC3-0003we-Nu; Thu, 26 Mar 2020 14:01:04 +0200 From: Luca Coelho To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Date: Thu, 26 Mar 2020 14:00:39 +0200 Message-Id: <20200326120042.578777-10-luca@coelho.fi> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200326120042.578777-1-luca@coelho.fi> References: <20200326120042.578777-1-luca@coelho.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on farmhouse.coelho.fi X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, TVD_RCVD_IP autolearn=ham autolearn_force=no version=3.4.4 Subject: [PATCH 09/12] mac80211: minstrel_ht_assign_best_tp_rates: remove redundant test Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg We know this pointer isn't NULL and in fact dereferenced it before, remove the redundant test. Change-Id: Iae9015573d6c350cc1b12a311d6d13d086beec6c Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- net/mac80211/rc80211_minstrel_ht.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 694a31978a04..5547111d22bf 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2010-2013 Felix Fietkau + * Copyright (C) 2019-2020 Intel Corporation */ #include #include @@ -490,7 +491,7 @@ minstrel_ht_assign_best_tp_rates(struct minstrel_ht_sta *mi, tmp_prob = mi->groups[tmp_group].rates[tmp_idx].prob_avg; tmp_mcs_tp = minstrel_ht_get_tp_avg(mi, tmp_group, tmp_idx, tmp_prob); - if (tmp_cck_tp_rate && tmp_cck_tp > tmp_mcs_tp) { + if (tmp_cck_tp > tmp_mcs_tp) { for(i = 0; i < MAX_THR_RATES; i++) { minstrel_ht_sort_best_tp_rates(mi, tmp_cck_tp_rate[i], tmp_mcs_tp_rate); -- 2.25.1