From: Karolina Drobnik <karolinadrobnik@gmail.com>
To: outreachy-kernel@googlegroups.com
Cc: gregkh@linuxfoundation.org, forest@alittletooquiet.net,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Karolina Drobnik <karolinadrobnik@gmail.com>,
Mike Rapoport <mike.rapoport@gmail.com>
Subject: [PATCH v2 8/8] staging: vt6655: Delete bogus check for `init_count` in AL7230
Date: Mon, 1 Nov 2021 14:32:06 +0000 [thread overview]
Message-ID: <ef1cc739e6b3e00c0ff138f25d1b9eb4d27e7763.1635773681.git.karolinadrobnik@gmail.com> (raw)
In-Reply-To: <cover.1635773679.git.karolinadrobnik@gmail.com>
Remove an unnecessary check in `rf_write_wake_prog_syn` in `RF_AIROHA7230`
switch case. This `if` conditional will never be true as `init_count` is
equal to 19 and can't be bigger than `MISCFIFO_SYNDATASIZE - 0`, which
is equal to 21.
Suggested-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Karolina Drobnik <karolinadrobnik@gmail.com>
---
drivers/staging/vt6655/rf.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/staging/vt6655/rf.c b/drivers/staging/vt6655/rf.c
index a150f1df3824..653f72c7ce5b 100644
--- a/drivers/staging/vt6655/rf.c
+++ b/drivers/staging/vt6655/rf.c
@@ -710,8 +710,6 @@ bool rf_write_wake_prog_syn(struct vnt_private *priv, unsigned char rf_type,
/* Init Reg + Channel Reg (3) */
init_count = CB_AL7230_INIT_SEQ + 3;
sleep_count = 0;
- if (init_count > (MISCFIFO_SYNDATASIZE - sleep_count))
- return false;
init_table = (channel <= CB_MAX_CHANNEL_24G) ?
al7230_init_table : al7230_init_table_a_mode;
--
2.30.2
prev parent reply other threads:[~2021-11-01 14:32 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-01 14:31 [PATCH v2 0/8] subject: staging: vt6655: Fix line wrapping in `RFvWriteWakeProgSyn` Karolina Drobnik
2021-11-01 14:31 ` [PATCH v2 1/8] staging: vt6655: Introduce `idx` temporary variable Karolina Drobnik
2021-11-04 12:09 ` Dan Carpenter
2021-11-04 14:33 ` Joe Perches
2021-11-05 12:51 ` Dan Carpenter
2021-11-01 14:32 ` [PATCH v2 2/8] staging: vt6655: Use incrementation in `idx` Karolina Drobnik
2021-11-04 12:15 ` Dan Carpenter
2021-11-04 13:00 ` Dan Carpenter
2021-11-04 14:44 ` Joe Perches
2021-11-04 17:40 ` Dan Carpenter
2021-11-01 14:32 ` [PATCH v2 3/8] staging: vt6655: Remove unused `i` increments Karolina Drobnik
2021-11-04 13:38 ` Dan Carpenter
2021-11-08 9:57 ` Karolina Drobnik
2021-11-08 10:16 ` Dan Carpenter
2021-11-01 14:32 ` [PATCH v2 4/8] staging: vt6655: Rewrite conditional in AL7320 initialization Karolina Drobnik
2021-11-01 14:32 ` [PATCH v2 5/8] staging: vt6655: Rename `RFvWriteWakeProgSyn` function Karolina Drobnik
2021-11-01 14:32 ` [PATCH v2 6/8] staging: vt6655: Update comment for `rf_write_wake_prog_syn` Karolina Drobnik
2021-11-01 14:32 ` [PATCH v2 7/8] staging: vt6655: Delete bogus check for `init_count` in AL2230 Karolina Drobnik
2021-11-01 14:32 ` Karolina Drobnik [this message]
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=ef1cc739e6b3e00c0ff138f25d1b9eb4d27e7763.1635773681.git.karolinadrobnik@gmail.com \
--to=karolinadrobnik@gmail.com \
--cc=forest@alittletooquiet.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mike.rapoport@gmail.com \
--cc=outreachy-kernel@googlegroups.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
all inboxes | Powered by JetHome®