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:   Mon, 19 Jun 2023 14:27:51 +0300
From:   Andy Shevchenko <andriy.shevchenko@...el.com>
To:     Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
Cc:     linux-media@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-i2c@...r.kernel.org,
        Luca Ceresoli <luca.ceresoli@...tlin.com>,
        Matti Vaittinen <Matti.Vaittinen@...rohmeurope.com>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Wolfram Sang <wsa@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Peter Rosin <peda@...ntia.se>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Michael Tretter <m.tretter@...gutronix.de>,
        Hans Verkuil <hverkuil@...all.nl>,
        Mike Pagano <mpagano@...too.org>,
        Krzysztof HaƂasa <khalasa@...p.pl>,
        Marek Vasut <marex@...x.de>,
        Satish Nagireddy <satish.nagireddy@...cruise.com>
Subject: Re: [PATCH v14 17/18] media: i2c: ds90ub953: Restructure clkout
 management

On Mon, Jun 19, 2023 at 02:11:09PM +0300, Tomi Valkeinen wrote:
> On 19/06/2023 13:44, Andy Shevchenko wrote:
> > On Mon, Jun 19, 2023 at 01:14:34PM +0300, Tomi Valkeinen wrote:
> > > On 16/06/2023 17:37, Andy Shevchenko wrote:
> > > > On Fri, Jun 16, 2023 at 04:59:21PM +0300, Tomi Valkeinen wrote:

...

> > > > > +struct ub953_clkout_data {
> > > > > +	u32 hs_div;
> > > > > +	u32 m;
> > > > > +	u32 n;
> > > > 
> > > > Please, use struxt u32_fract instead of m/n.
> > > 
> > > I'm not sure how that helps. The documentation talks about m and n. Using
> > > different terms will make it more difficult to compare the code and the
> > > docs.
> > 
> > You can always add a comment.
> > 
> > (For example in drivers/clk/clk-fractional-divider.c our documentation also
> >   says about m/n, but most of the people understands that this is about
> >   fractional divider and actually with properly spelled parameters it will
> >   help others who are not experts in the CLK hardware.)
> 
> Yes, I would agree with you if this was a generic piece of code, but I don't
> see the reasoning as valid as this is specific to a piece of hardware. Here,
> I think, matching the code to the HW documentation is more important than
> possibly making the code more understandable to people who are not familiar
> with the HW.
> 
> Especially as for non-English people seeing "numerator" and "denominator"
> might require a check to figure out which one is which, whereas m and n are
> (I would guess) a bit more universal (or maybe it's just me).

I think for unprepared user the English plain words are simpler,
or maybe it's just me.

At least we have a strong disagreement here, seems :-)

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ