All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Brzezinka <sebastian.brzezinka@intel.com>
To: Andi Shyti <andi.shyti@kernel.org>
Cc: <intel-gfx@lists.freedesktop.org>, <andi.shyti@linux.intel.com>,
	<krzysztof.karas@intel.com>
Subject: Re: [PATCH 1/3] drm/i915: Refactor eb_relocate_vma for clarity
Date: Thu, 17 Jul 2025 07:58:19 +0000	[thread overview]
Message-ID: <DBE65MGKVYSZ.3BBT6U2CJN2EW@intel.com> (raw)
In-Reply-To: <cetvl5iy2fhmaiwkr7lbsrs24afdke76vhcrxvdepdqvdujhvm@bc7ntlhdcnhd>

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


  reply	other threads:[~2025-07-17  7:58 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-16  9:36 [PATCH 0/3] drm/i915: i915_gem_execbuffer.c minor improved Sebastian Brzezinka
2025-07-16  9:37 ` [PATCH 1/3] drm/i915: Refactor eb_relocate_vma for clarity Sebastian Brzezinka
2025-07-16 13:18   ` Krzysztof Karas
2025-07-16 13:49   ` Andi Shyti
2025-07-16 14:39     ` Sebastian Brzezinka
2025-07-16 17:28       ` Andi Shyti
2025-07-17  7:58         ` Sebastian Brzezinka [this message]
2025-07-17  9:38           ` Andi Shyti
2025-07-16  9:37 ` [PATCH 2/3] drm/i915: Add braces around the else block in clflush_write32() Sebastian Brzezinka
2025-07-16 13:47   ` Krzysztof Karas
2025-07-16 14:07     ` Sebastian Brzezinka
2025-07-16 13:51   ` Andi Shyti
2025-07-16 14:48     ` Sebastian Brzezinka
2025-07-16  9:37 ` [PATCH 3/3] drm/i915: Replaced hardcoded value 4095 with PAGE_SIZE - 1 Sebastian Brzezinka
2025-07-16 13:52   ` Andi Shyti
2025-07-16 14:01     ` Sebastian Brzezinka
2025-07-16 12:49 ` ✓ i915.CI.BAT: success for drm/i915: i915_gem_execbuffer.c minor improved Patchwork
2025-07-17  4:11 ` ✓ i915.CI.Full: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DBE65MGKVYSZ.3BBT6U2CJN2EW@intel.com \
    --to=sebastian.brzezinka@intel.com \
    --cc=andi.shyti@kernel.org \
    --cc=andi.shyti@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=krzysztof.karas@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.