From: Dan Carpenter <dan.carpenter@linaro.org>
To: Yogesh Hegde <yogi.kernel@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] staging: rtl8192e: Rename tmpRegA and TempCCk
Date: Wed, 10 May 2023 19:56:29 +0300 [thread overview]
Message-ID: <290473de-5946-49d4-9309-6bebf7cc9873@kili.mountain> (raw)
In-Reply-To: <c9c67f832db3a776c04f26e0afb083ae3ba99c07.1683730854.git.yogi.kernel@gmail.com>
On Wed, May 10, 2023 at 08:39:07PM +0530, Yogesh Hegde wrote:
> @@ -680,17 +680,17 @@ static void _rtl92e_dm_tx_power_tracking_cb_thermal(struct net_device *dev)
> return;
> }
>
> - tmpRegA = rtl92e_get_rf_reg(dev, RF90_PATH_A, 0x12, 0x078);
> - if (tmpRegA < 3 || tmpRegA > 13)
> + tmp_reg = rtl92e_get_rf_reg(dev, RF90_PATH_A, 0x12, 0x078);
> + if (tmp_reg < 3 || tmp_reg > 13)
> return;
> - if (tmpRegA >= 12)
> - tmpRegA = 12;
> + if (tmp_reg >= 12)
> + tmp_reg = 12;
Not related to your patch (which is fine) but this if statement can be
deleted.
> priv->thermal_meter[0] = ThermalMeterVal;
> priv->thermal_meter[1] = ThermalMeterVal;
>
> - if (priv->thermal_meter[0] >= (u8)tmpRegA) {
> + if (priv->thermal_meter[0] >= (u8)tmp_reg) {
And casting tmp_reg to u8 is nonsense so that casting can be deleted too.
2 separate patches:
patch 1: delete unecessary if statement
patch 2: delete unecessary casting
regards,
dan carpenter
next prev parent reply other threads:[~2023-05-10 16:56 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 [this message]
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 ` [PATCH 4/4] staging: rtl8192e: Refactor tmp_ofdm_index variable assignment Yogesh Hegde
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=290473de-5946-49d4-9309-6bebf7cc9873@kili.mountain \
--to=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=yogi.kernel@gmail.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®