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] [day] [month] [year] [list]
Date:   Thu, 27 Feb 2020 13:33:14 +0100
From:   Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>
To:     Sam Shih <sam.shih@...iatek.com>
Cc:     linux-pwm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Thierry Reding <thierry.reding@...il.com>,
        linux-mediatek@...ts.infradead.org,
        John Crispin <john@...ozen.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH 1/1] pwm: mediatek: add longer period support

Hello Sam,

On Thu, Feb 27, 2020 at 08:27:07PM +0800, Sam Shih wrote:
> > > 
> > > + /* The pwm source clock can be divided by 2^clkdiv. When the clksel  +
> > > * bit is set to 1, The final clock output needs to be divided by an +  *
> > > extra 1625.
> > > +  */
> > 
> > I'd write:
> > 
> > The source clock is divided by 2^clkdiv or iff the clksel bit is set by
> > 2^clkdiv + 1625.
> > 
> 
> Great, the comment is short and clear. 
> But maybe change “2^clkdiv + 1625” to “the product of 2^clkdiv and 1625”
> is clearer ?

Writing a formula in words isn't helpful. If my formula was wrong use
the right one. I wrote

	2^clkdiv + 1625

(which implicitly means (2^clkdiv) + 1625), if this is wrong write

	2^clkdiv * 1625

or whatever is the right one then. And use parenthesis if you doubt
clearness.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ