linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Biju Das <biju.das.jz@bp.renesas.com>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Ulf Hansson <ulf.hansson@linaro.org>,
	"linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	"linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Chris Paterson <Chris.Paterson2@renesas.com>,
	Biju Das <biju.das@bp.renesas.com>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: RE: [PATCH v3] mmc: renesas_sdhi: Fix rounding errors
Date: Sun, 25 Sep 2022 17:06:39 +0000	[thread overview]
Message-ID: <TYCPR01MB5933319E9510B176644D2BC986539@TYCPR01MB5933.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <Yy7ZcJ8h2VCtUDnW@shikoro>

Hi Wolfram,

Thanks for the feedback.

> Subject: Re: [PATCH v3] mmc: renesas_sdhi: Fix rounding errors
> 
> Hi,
> 
> > v2->v3:
> >  * Renamed the variable new_clock_margin->new_upper_limit in
> renesas_sdhi_clk_
> >    update()
> >  * Moved setting of new_upper_limit outside for loop.
> >  * Updated the comment section to mention the rounding errors and
> merged with
> >    existing comment out side the for loop.
> >  * Updated commit description.
> 
> I really like the new variable names.
> 
> > +	 * To fix rounding errors, eg:- (533333333 Hz / 4 * 4 = 533333332
> Hz
> > +<
> 
> (What is the '-' after 'eg:' for?)

Regarding 'eg:-', I got this habit from school days. On exams, I usually
write for eg:- to provide some examples.

OK, Will remove '-' after 'eg:'.

> 
> > +	 * 533333333 Hz) add an upper limit of 1/1024 rate higher to the
> clock
> > +	 * rate.
> 
> I know Geert suggesgted this. I think, however, this description is
> too short. It should be mentioned IMHO that this rounding error can
> lead to the selection of a clock which is way off (the 400MHz one). I
> liked this example from v2. Geert, what do you say?

Yes, I can put back the real example from v2, if that is useful.
533MHz->400 MHz is a big jump due to this rounding error and it has
impacted the performance.

Waiting for Geert's feedback.

Cheers,
Biju

  reply	other threads:[~2022-09-25 17:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22  8:55 [PATCH v3] mmc: renesas_sdhi: Fix rounding errors Biju Das
2022-09-24 10:18 ` Wolfram Sang
2022-09-25 17:06   ` Biju Das [this message]
2022-09-26 12:20     ` Geert Uytterhoeven
2022-09-26 12:52       ` Biju Das
2022-09-25 16:51 ` Wolfram Sang
2022-09-26 17:13   ` Biju Das

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=TYCPR01MB5933319E9510B176644D2BC986539@TYCPR01MB5933.jpnprd01.prod.outlook.com \
    --to=biju.das.jz@bp.renesas.com \
    --cc=Chris.Paterson2@renesas.com \
    --cc=biju.das@bp.renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=ulf.hansson@linaro.org \
    --cc=wsa+renesas@sang-engineering.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;
as well as URLs for NNTP newsgroup(s).