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: <CAMuHMdWTUwtVFV0o-Hsxp+eTscHHuzOmnBjv7BPoK8moQ7i9Qg@mail.gmail.com>
Date: Thu, 2 Jan 2025 10:28:22 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc: linux-i3c@...ts.infradead.org, linux-kernel@...r.kernel.org, 
	linux-renesas-soc@...r.kernel.org, 
	Rasmus Villemoes <linux@...musvillemoes.dk>, Przemysław Gaj <pgaj@...ence.com>, 
	Alexandre Belloni <alexandre.belloni@...tlin.com>
Subject: Re: [PATCH RFT v2 5/5] i3c: cdns: use get_parity8 helper instead of
 open coding it

Hi Wolfram,

On Thu, Jan 2, 2025 at 10:04 AM Wolfram Sang
<wsa+renesas@...g-engineering.com> wrote:
> > >         /* RR0[0] = ~XOR(addr[6:0]) */
> > > -       if (!(hweight8(addr & 0x7f) & 1))
> > > -               ret |= 1;
> > > +       ret |= parity8(addr & 0x7f) ? 0 : BIT(0);
> >
> > Perhaps keep the if()-construct, to better match the example in the
> > documentation in 1/5?
>
> Can do, don't care super much. I chose this construct because the other
> drivers in I3C use the above pattern. You still like the if() better?

Let's add more bike-shedding in 2025 ;-)

There's also a general dislike for the ternary operator (BTW, I do
agree it has its uses), especially if one of the paths is a no-op,
like ORing with zero.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ