[PATCH 1/3] drm/i915: Refactor eb_relocate_vma for clarity
Sebastian Brzezinka
sebastian.brzezinka at intel.com
Thu Jul 17 07:58:19 UTC 2025
On Wed Jul 16, 2025 at 5:28 PM UTC, Andi Shyti wrote:
> Hi Sebastian,
>
> ...
>
>> >> out:
>> >> reloc_cache_reset(&eb->reloc_cache, eb);
>> >> - return remain;
>> >> + return ret;
>> >
>> > now, this function is also returning a different value, not the
>> > remaining bytes anymore but 0 on success and -error on failure.
>> > Is this something you wanted?
>> Function still returning the same value as before, but now we
>> don't reuse variable. Regardless, the caller treats any return
>> value the same. Still, the return value is either 0, an error,
>> or an offset, just like before.
>
> Even when this is true:
Yep, the funny part is that you have an unsigned value for offset,
but it's cast to signed to check for errors and return, there was
no actual offset in that variable, just an error code,and I didn’t
really modify it, just used the 'ret' variable.
--
Best regards,
Sebastian
More information about the Intel-gfx
mailing list