From: Yury Norov <yury.norov@gmail.com>
To: I Hsin Cheng <richard120310@gmail.com>
Cc: jstultz@google.com, tglx@linutronix.de, sboyd@kernel.org,
linux-kernel@vger.kernel.org, yurynorov@gmail.com,
skhan@linuxfoundation.org, linux-kernel-mentees@lists.linux.dev,
jserv@ccns.ncku.edu.tw
Subject: Re: [PATCH v3] clocksource: Replace loop within clocks_calc_mult_shift() with find_last_bit() for calculation of "sftacc"
Date: Wed, 11 Jun 2025 10:30:24 -0400 [thread overview]
Message-ID: <aEmTAMc9stMWMMI-@yury> (raw)
In-Reply-To: <aEmSH50geb-2qTBb@vaxr-BM6660-BM6360>
On Wed, Jun 11, 2025 at 10:26:39PM +0800, I Hsin Cheng wrote:
> line
> In-Reply-To: <aEltbEpA7US9h8qN@yury>
> Status: O
> Content-Length: 5191
> Lines: 144
>
> On Wed, Jun 11, 2025 at 07:50:04AM -0400, Yury Norov wrote:
> > On Wed, Jun 11, 2025 at 03:36:08PM +0800, I Hsin Cheng wrote:
> Hi Yury,
>
> Thanks for your suggestions !
>
> > 1. sftacc is known to be 32. Comparing against 0 is useless.
> > 2. Just use __fls():
> > if (tmp)
> > sftacc -=__fls(tmp) + 1;
> >
>
> No problem, I'll fix them up in the next version.
> Just wondering the reason to use __fls() directly, is it because we're
> sure that the value of "tmp" will definitely fall into
> small_const_nbits() case in find_last_bit() ?
That's because tmp is not a bitmap. It's u64.
prev parent reply other threads:[~2025-06-11 14:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-11 7:36 [PATCH v3] clocksource: Replace loop within clocks_calc_mult_shift() with find_last_bit() for calculation of "sftacc" I Hsin Cheng
2025-06-11 11:50 ` Yury Norov
2025-06-11 14:26 ` I Hsin Cheng
2025-06-11 14:30 ` Yury Norov [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=aEmTAMc9stMWMMI-@yury \
--to=yury.norov@gmail.com \
--cc=jserv@ccns.ncku.edu.tw \
--cc=jstultz@google.com \
--cc=linux-kernel-mentees@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=richard120310@gmail.com \
--cc=sboyd@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=tglx@linutronix.de \
--cc=yurynorov@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