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: <CAHp75Vdm-2DqDhVe2s-OF-5kiJV01fUp1u1iWFDT2fGSzrqXvg@mail.gmail.com>
Date:   Sun, 9 Jan 2022 13:43:02 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     "Gabriel L. Somlo" <gsomlo@...il.com>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Rob Herring <robh+dt@...nel.org>,
        devicetree <devicetree@...r.kernel.org>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        linux-mmc <linux-mmc@...r.kernel.org>,
        Karol Gugala <kgugala@...micro.com>,
        Mateusz Holenko <mholenko@...micro.com>,
        Kamil Rakoczy <krakoczy@...micro.com>,
        mdudek@...ernships.antmicro.com,
        Paul Mackerras <paulus@...abs.org>,
        Joel Stanley <joel@....id.au>,
        Stafford Horne <shorne@...il.com>,
        Geert Uytterhoeven <geert@...ux-m68k.org>,
        david.abdurachmanov@...ive.com,
        Florent Kermarrec <florent@...oy-digital.fr>,
        Randy Dunlap <rdunlap@...radead.org>
Subject: Re: [PATCH v9 3/3] mmc: Add driver for LiteX's LiteSDCard interface

On Sun, Jan 9, 2022 at 2:26 AM Gabriel L. Somlo <gsomlo@...il.com> wrote:
> On Sat, Jan 08, 2022 at 07:43:19PM +0200, Andy Shevchenko wrote:
> > On Sat, Jan 8, 2022 at 6:11 PM Gabriel Somlo <gsomlo@...il.com> wrote:

...

> > > +       u32 div;
> > > +
> > > +       div = freq ? host->ref_clk / freq : 256U;
> >
> > > +       div = roundup_pow_of_two(div);
> > > +       div = clamp(div, 2U, 256U);
> >
> > Not sure why it becomes two lines again.
>
> Per my previous email, I have:
>
>         div = clamp((u32)roundup_pow_of_two(div), 2U, 256U);
>
> ... lined up for v10 (pending also Geert's OK on the (u32) cast
> to shut up compiler warnings) :)

Yeah, I have read that and I think we may survive without comment and
being in two lines.

That roundup_pow_of_two may return int, unsigned long, and who knows
what depending on the per arch implementations.

What a mess...

...

>     /* wrapper for use with devm_add_action_or_reset(), below */

No need for this comment.

>     static void litex_mmc_free_host_wrapper(void *ptr)
>     {

>         mmc_free_host((struct mmc_host *)ptr);

Casting is not needed, just name the variable as mmc

        mmc_free_host(mmc);

>     }

...

> I'll wait till sometime tomorrow for additional feedback on clamp()
> casting and voltage range hard-coding vs. regulators, before I send
> out v10 so we can continue from there.

Thanks!


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ