lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFBinCA3ho9fAb-iJhUEVw-=_Jbgd6UU8_9WEyvpt-+CL_V6ew@mail.gmail.com>
Date: Thu, 22 Feb 2024 22:57:02 +0100
From: Martin Blumenstingl <martin.blumenstingl@...glemail.com>
To: Daniel Lezcano <daniel.lezcano@...aro.org>
Cc: tglx@...utronix.de, linux-arm-kernel@...ts.infradead.org, 
	linux-kernel@...r.kernel.org, patrice.chotard@...s.st.com, 
	linux-amlogic@...ts.infradead.org
Subject: Re: [PATCH v1] clocksource/drivers/arm_global_timer: Simplify
 prescaler register access

Hi Daniel,

On Thu, Feb 22, 2024 at 11:02 AM Daniel Lezcano
<daniel.lezcano@...aro.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?


Best regards,
Martin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ