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: Thu, 11 May 2023 17:21:07 +0300 [thread overview]
Message-ID: <613ae5dd-2b36-4c87-8b6e-959e58d077fd@kili.mountain> (raw)
In-Reply-To: <ZFz5Lxc/gUTKkLNX@pop-os.localdomain>
On Thu, May 11, 2023 at 07:48:23PM +0530, Yogesh Hegde wrote:
> On Wed, May 10, 2023 at 07:56:29PM +0300, Dan Carpenter wrote:
> > 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
>
> Thank you for taking the time to review my patch and provide your
> feedback. Your suggestions are duly noted, and I appreciate your
> guidance.
>
> I will make them into separate patches and submit it.
You don't have to if you don't want to. We can apply the patches you
sent as-is. (No need to resend). This was just in case anyone felt
motivated to do some more clean up work.
regards,
dan carpenter
next prev parent reply other threads:[~2023-05-11 14:21 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 [this message]
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=613ae5dd-2b36-4c87-8b6e-959e58d077fd@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®