On Mon, Jul 25, 2016 at 10:55:24AM +0300, Joonas Lahtinen wrote:
> On ma, 2016-07-25 at 08:44 +0100, Chris Wilson wrote:
> > list_first_entry_or_null() can generate better code than using
> > if (!list_empty()) {ptr = list_first_entry()) ..., so put it to use.
> >
> > Signed-off-by: Chris Wilson <[email protected]>
>
> It looks cleaner, not so sure of the code impact.
After the patch I sent to linux-kernel@ to improve code gneration for
list_first_entry_or_null() is applied we save a few bytes on each
invocation.
There are a few other places where I could have used
list_first_entry_or_null() but I have already sent patches transforming
the code so I didn't bother with the intermediate minor improvement.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx