Linux kernel staging patches
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Julia Lawall <julia.lawall@inria.fr>
Cc: Ayush Tiwari <ayushtiw0110@gmail.com>,
	Larry.Finger@lwfinger.net, florian.c.schilhabel@googlemail.com,
	gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	linux-staging@lists.linux.dev, outreachy@lists.linux.dev
Subject: Re: [PATCH v4] staging: rtl8712: rename tmpVal to pct_val
Date: Wed, 13 Mar 2024 11:36:07 +0300	[thread overview]
Message-ID: <f4b889c8-9816-47e9-88e1-2acc9c169b8a@moroto.mountain> (raw)
In-Reply-To: <2c63a094-6966-7679-2b23-58c057b451d8@inria.fr>

On Wed, Mar 13, 2024 at 09:18:08AM +0100, Julia Lawall wrote:
> 
> 
> On Wed, 13 Mar 2024, Ayush Tiwari wrote:
> 
> > Rename local variable tmpVal to pct_val in function process_link_qual
> > to give intuitive meaning to variable and match the common kernel
> > coding style.
> 
> I don't think that the patch with the name avg_val was accepted, so this
> patch has to replace tmpVal by pct_val, as you say in the subject line.
> 
> Also, the comment says:
> 
> /* <1> Showed on UI for user, in percentage. */
> 
> I still have the impression that the value calculated here is an average.
> Total num is just incremented:
> 
> if (sqd->total_num++ >= PHY_LINKQUALITY_SLID_WIN_MAX)
> 
> while total_val is updated with a new value.

Oh, yeah.  My bad.  I misunderstood the comment.  The original value is
in percent.  prframe->u.hdr.attrib.signal_qual.  It's set in
query_rx_phy_status().

Sorry about that.

regards,
dan carpenter


      reply	other threads:[~2024-03-13  8:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-13  8:10 [PATCH v4] staging: rtl8712: rename tmpVal to pct_val Ayush Tiwari
2024-03-13  8:18 ` Julia Lawall
2024-03-13  8:36   ` Dan Carpenter [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=f4b889c8-9816-47e9-88e1-2acc9c169b8a@moroto.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=Larry.Finger@lwfinger.net \
    --cc=ayushtiw0110@gmail.com \
    --cc=florian.c.schilhabel@googlemail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=julia.lawall@inria.fr \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    --cc=outreachy@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).