mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yogesh Hegde <yogi.kernel@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 4/4] staging: rtl8192e: Refactor tmp_ofdm_index variable assignment
Date: Wed, 10 May 2023 20:40:04 +0530	[thread overview]
Message-ID: <af7bc22ec142c33cf7346c1ab13d192b55095d1e.1683730854.git.yogi.kernel@gmail.com> (raw)
In-Reply-To: <cover.1683730854.git.yogi.kernel@gmail.com>

Refactor tmp_ofdm_index variable assignment to avoid multiple
assignments which is not accepted by checkpatch.

Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index a44be3f810ab..feac50cd8fa0 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -689,8 +689,8 @@ static void _rtl92e_dm_tx_power_tracking_cb_thermal(struct net_device *dev)
 	priv->thermal_meter[1] = ThermalMeterVal;
 
 	if (priv->thermal_meter[0] >= (u8)tmp_reg) {
-		tmp_ofdm_index = tmp_cck_20m_index = 6+(priv->thermal_meter[0] -
-			      (u8)tmp_reg);
+		tmp_ofdm_index = 6 + (priv->thermal_meter[0] - (u8)tmp_reg);
+		tmp_cck_20m_index = tmp_ofdm_index;
 		tmp_cck_40m_index = tmp_cck_20m_index - 6;
 		if (tmp_ofdm_index >= OFDM_TABLE_LEN)
 			tmp_ofdm_index = OFDM_TABLE_LEN - 1;
-- 
2.34.1


  parent reply	other threads:[~2023-05-10 15:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-10 15:08 [PATCH 0/4] staging: rtl8192e: Trivial code cleanup patches Yogesh Hegde
2023-05-10 15:09 ` [PATCH 1/4] staging: rtl8192e: Rename tmpRegA and TempCCk Yogesh Hegde
2023-05-10 16:56   ` Dan Carpenter
2023-05-11 14:18     ` Yogesh Hegde
2023-05-11 14:21       ` Dan Carpenter
2023-05-11 16:44         ` Yogesh Hegde
2023-05-10 15:09 ` [PATCH 2/4] staging: rtl8192e: Rename tmpOFDMindex and tmpCCKindex Yogesh Hegde
2023-05-10 15:09 ` [PATCH 3/4] staging: rtl8192e: Rename tmpCCK20Mindex and tmpCCK40Mindex Yogesh Hegde
2023-05-10 15:10 ` Yogesh Hegde [this message]
2023-05-11 20:55 ` [PATCH 0/4] staging: rtl8192e: Trivial code cleanup patches Philipp Hortmann

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=af7bc22ec142c33cf7346c1ab13d192b55095d1e.1683730854.git.yogi.kernel@gmail.com \
    --to=yogi.kernel@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /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®