From: Daniel Lezcano <daniel.lezcano@linaro.org>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: tglx@linutronix.de, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, patrice.chotard@foss.st.com,
linux-amlogic@lists.infradead.org
Subject: Re: [PATCH v1] clocksource/drivers/arm_global_timer: Simplify prescaler register access
Date: Thu, 22 Feb 2024 23:34:24 +0100 [thread overview]
Message-ID: <230587eb-dd68-414b-af15-47b1eb3d14e3@linaro.org> (raw)
In-Reply-To: <CAFBinCA3ho9fAb-iJhUEVw-=_Jbgd6UU8_9WEyvpt-+CL_V6ew@mail.gmail.com>
On 22/02/2024 22:57, Martin Blumenstingl wrote:
> Hi Daniel,
>
> On Thu, Feb 22, 2024 at 11:02 AM Daniel Lezcano
> <daniel.lezcano@linaro.org> wrote:
> [ ... ]
>>
>>> /* prescaler within legal range? */
>>> - if (psv < 0 || psv > GT_CONTROL_PRESCALER_MAX)
>>> + if (psv < 0 || psv > FIELD_GET(GT_CONTROL_PRESCALER_MASK, ~0))
>>
>> FIELD_MAX() ?
> Oh, I was not aware of FIELD_MAX() - thank you!
> While researching that I found that there's also FIELD_FIT() which I
> think is perfect here. What do you think?
Ah yes, even better :)
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
prev parent reply other threads:[~2024-02-22 22:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-21 21:43 Martin Blumenstingl
2024-02-22 10:02 ` Daniel Lezcano
2024-02-22 21:57 ` Martin Blumenstingl
2024-02-22 22:34 ` Daniel Lezcano [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=230587eb-dd68-414b-af15-47b1eb3d14e3@linaro.org \
--to=daniel.lezcano@linaro.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=patrice.chotard@foss.st.com \
--cc=tglx@linutronix.de \
/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®