[Intel-gfx] [PATCH 2/6] treewide: remove using list iterator after loop body as a ptr
torvalds at linux-foundation.org
Mon Feb 28 20:10:24 UTC 2022
On Mon, Feb 28, 2022 at 12:03 PM Linus Torvalds
<torvalds at linux-foundation.org> wrote:
> Side note: we do need *some* way to do it.
This patch is a work of art.
And I mean that in the worst possible way.
We can do
in the 'for ()' loop, and never use __iter at all.
That means that inside the for-loop, we use a _different_ 'pos' than outside.
And then the compiler will not see some "might be uninitialized", but
the outer 'pos' *will* be uninitialized.
Unless, of course, the outer 'pos' had that pointless explicit initializer.
Here - can somebody poke holes in this "work of art" patch?
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1927 bytes
Desc: not available
More information about the Intel-gfx