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: <Ygv32CptVknidyP3@smile.fi.intel.com>
Date:   Tue, 15 Feb 2022 20:58:32 +0200
From:   Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:     Jani Nikula <jani.nikula@...ux.intel.com>
Cc:     intel-gfx@...ts.freedesktop.org, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org,
        Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        Tvrtko Ursulin <tvrtko.ursulin@...ux.intel.com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: Re: [PATCH v1 1/1] drm/i915/selftests: Replace too verbose for-loop
 with simpler while

On Tue, Feb 15, 2022 at 07:14:49PM +0200, Jani Nikula wrote:
> On Tue, 15 Feb 2022, Andy Shevchenko <andriy.shevchenko@...ux.intel.com> wrote:
> > It's hard to parse for-loop which has some magic calculations inside.
> > Much cleaner to use while-loop directly.
> 
> I assume you're trying to prove a point following our recent
> for-vs-while loop discussion. I really can't think of any other reason
> you'd end up looking at this file or this loop.
> 
> With the change, the loop indeed becomes simpler, but it also runs one
> iteration further than the original. Whoops.

Yeah, sorry for that, the initial condition should be d = depth - 1,
of course.

> It's a selftest. The loop's been there for five years. What are we
> trying to achieve here? So we disagree on loops, fine. Perhaps this is
> not the best use of either of our time? Please just let the for loops in
> i915 be.

Yes, I'm pretty much was sure that no-one will go and apply this anyway
(so I haven't paid too much attention), but to prove my point in the
certain discussion.

And yes, the point is for the new code, I'm not going to change existing
suboptimal and too hard to read for-loops, it will consume my time later
when I will try to understand the code.

-- 
With Best Regards,
Andy Shevchenko


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ