Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5557440rdb; Wed, 13 Dec 2023 12:06:31 -0800 (PST) X-Google-Smtp-Source: AGHT+IHHCM5tzL6RK7e78G8AKL7reNT+f5URctUHzS6cV26FEQ2ByrTMVf0bYZBh6j/nU8igbDFh X-Received: by 2002:a9d:628b:0:b0:6d9:d4e6:c398 with SMTP id x11-20020a9d628b000000b006d9d4e6c398mr5038558otk.21.1702497991594; Wed, 13 Dec 2023 12:06:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702497991; cv=none; d=google.com; s=arc-20160816; b=dn15QXxOnubOcOqsplt3IOWCtrK8rPMJQ/OktQ/AnIHtKVWlVdZiRXfzJwYgmCVi2f fjlxLBii8QjFZHkZ6Q+VhpeMi9heJXx99YLtE6GuM2lDD+Ub4P76ITe1uGHWB2qcv9gr G2oqUZFM+sfCw03OBnMT7LWDCN44Hn0xZE4cU6rSbkiumsSrwhX7LEJAc431xRdxFI9c wSJsWd7C+oL2jwJGhE/nYMq+Hc5xom7ddUAHeZd+VRxxnWhpbelv/nhOnBfwG8vLa3Kz PmfkaH5NjuSCG4MWUJVfR1+dp7VI5D9rcnOiqY2pfnNLzhwrLR7I7kNHFoIOooKfmwtB 2wqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oYqT+z3zv+88VX7/KyR98U20ZSfEL2KkqJKJNS04oJc=; fh=fTCASS6VJGH7BWbEsJdid2q2KgBaT1DfztvvSGX36hQ=; b=AHyfBm//KgJXRb8fLzpinQZwpMZZmSsyQoIKNR1QDu11ZDL71PE0jRjGdSAuJz+b0L Um8x0UCvAUm5giULHNyN12MPvV9vrJtLtVEbWdJuQmaStZW0kcxHA8RsbnuBj0UfZBEz uv4jOEWFXxsw/RMbsvmg1ZJx359rbbnBDnNAbl8xBidKma0MpyYGwka+JFcF8u7gEPnm iXusS9qbOnYhde9ncvqUFN7siRnt+Qp1MGIw+gHRxPQjL/ATlcS7maDnCyB99d0yk1QF QVQ32+lcsBGYHtgOjJcedo2dXeFL8RDEXeoQzrNX1XjExgDuvdPUwq3jqn9FP2bRt33j K7NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@wp.pl header.s=1024a header.b=KOjQTqgA; spf=pass (google.com: domain of linux-wireless+bounces-764-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-764-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wp.pl Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id y5-20020a05610207c500b0046604b3fac2si2005730vsg.760.2023.12.13.12.06.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 12:06:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-764-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@wp.pl header.s=1024a header.b=KOjQTqgA; spf=pass (google.com: domain of linux-wireless+bounces-764-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-wireless+bounces-764-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=wp.pl Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 366411C2011E for ; Wed, 13 Dec 2023 20:06:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 67A9577624; Wed, 13 Dec 2023 20:06:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=wp.pl header.i=@wp.pl header.b="KOjQTqgA" X-Original-To: linux-wireless@vger.kernel.org Received: from mx4.wp.pl (mx4.wp.pl [212.77.101.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 816F1C9 for ; Wed, 13 Dec 2023 12:06:20 -0800 (PST) Received: (wp-smtpd smtp.wp.pl 42379 invoked from network); 13 Dec 2023 21:06:17 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wp.pl; s=1024a; t=1702497977; bh=oYqT+z3zv+88VX7/KyR98U20ZSfEL2KkqJKJNS04oJc=; h=From:To:Cc:Subject; b=KOjQTqgAILsY/CFqVWa2OhiEcou6fDfpoM7vzWafunMYhjokmbcx10MFw8mnsh7gv C0/N/ldXW+gjFl/5VYxsbvrK22dfCnfpgzOdxKKFV2mcDJKWd2oSbfmN6dxcXrFrVa Rl8FTpO2ctnOFkWPNdT4HFBjvoruIXTKGcAbj8JI= Received: from 89-64-13-61.dynamic.chello.pl (HELO localhost) (stf_xl@wp.pl@[89.64.13.61]) (envelope-sender ) by smtp.wp.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 13 Dec 2023 21:06:17 +0100 Date: Wed, 13 Dec 2023 21:06:16 +0100 From: Stanislaw Gruszka To: Dmitry Antipov Cc: Kalle Valo , lvc-project@linuxtesting.org, linux-wireless@vger.kernel.org Subject: Re: [PATCH] [v2] wifi: rt2x00: remove useless code in rt2x00queue_create_tx_descriptor() Message-ID: <20231213200616.GA63361@wp.pl> References: <87il53nvqc.fsf@kernel.org> <20231213051449.126963-1-dmantipov@yandex.ru> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231213051449.126963-1-dmantipov@yandex.ru> X-WP-MailID: a391f45dd210ab3d53d92b195197980f X-WP-AV: skaner antywirusowy Poczty Wirtualnej Polski X-WP-SPAM: NO 0000000 [gTNw] On Wed, Dec 13, 2023 at 08:14:43AM +0300, Dmitry Antipov wrote: > In 'rt2x00queue_create_tx_descriptor()', there is no need to call > 'ieee80211_get_rts_cts_rate()' while checking for RTS/CTS frame > since this function returns NULL or pointer to internal bitrate > table entry, and the return value is not actually used. Compile > tested only. > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > Signed-off-by: Dmitry Antipov > --- > v2: avoid scoped locals (Kalle Valo) > --- > drivers/net/wireless/ralink/rt2x00/rt2x00queue.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c > index 98df0aef8168..013003777fee 100644 > --- a/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c > +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00queue.c > @@ -416,9 +416,6 @@ static void rt2x00queue_create_tx_descriptor(struct rt2x00_dev *rt2x00dev, > __set_bit(ENTRY_TXD_RTS_FRAME, &txdesc->flags); > else > __set_bit(ENTRY_TXD_CTS_FRAME, &txdesc->flags); > - if (tx_info->control.rts_cts_rate_idx >= 0) > - rate = > - ieee80211_get_rts_cts_rate(rt2x00dev->hw, tx_info); > } So we do not choose rate for RTS/CTS. Maybe we should actually, but the patch does not change the logic that exist here for more than 12 years, since commit 55b585e29095ce64900b6192aadf399fa007161e Author: Helmut Schaa Date: Thu Mar 3 19:43:49 2011 +0100 rt2x00: Don't call ieee80211_get_tx_rate for MCS rates I'm ok with the patch. Acked-by: Stanislaw Gruszka Thanks Stanislaw