Linux kernel staging patches
 help / color / mirror / Atom feed
From: Aleksandr Mishin <amishin@t-argos.ru>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Aleksandr Mishin <amishin@t-argos.ru>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Dan Carpenter <dan.carpenter@linaro.org>,
	Zhang Shurong <zhang_shurong@foxmail.com>,
	<linux-staging@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
	<lvc-project@linuxtesting.org>
Subject: [PATCH] staging: ks7010: Remove unneeded check in ks_wlan_get_range()
Date: Fri, 5 Jul 2024 23:44:34 +0300	[thread overview]
Message-ID: <20240705204434.10541-1-amishin@t-argos.ru> (raw)

In ks_wlan_get_range() variable 'i' which value is always 12, is compared
to 2. This check is unneeded and should be removed.

Remove unneeded check to clean up the code.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 13a9930d15b4 ("staging: ks7010: add driver from Nanonote extra-repository")
Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru>
---
 drivers/staging/ks7010/ks_wlan_net.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
index 0fb97a79ad0b..d56dae73e7ed 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -972,10 +972,7 @@ static int ks_wlan_get_range(struct net_device *dev,
 	 * in bit/s that we can expect using this interface.
 	 * May be use for QoS stuff... Jean II
 	 */
-	if (i > 2)
-		range->throughput = 5000 * 1000;
-	else
-		range->throughput = 1500 * 1000;
+	range->throughput = 5000 * 1000;
 
 	range->min_rts = 0;
 	range->max_rts = 2347;
-- 
2.30.2


             reply	other threads:[~2024-07-05 20:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-05 20:44 Aleksandr Mishin [this message]
2024-07-05 21:15 ` [PATCH] staging: ks7010: Remove unneeded check in ks_wlan_get_range() Dan Carpenter
2024-07-06 14:16 ` Wolfram Sang
2024-07-06 14:23   ` Philipp Hortmann
2024-07-06 14:34     ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240705204434.10541-1-amishin@t-argos.ru \
    --to=amishin@t-argos.ru \
    --cc=dan.carpenter@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=lvc-project@linuxtesting.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=zhang_shurong@foxmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox