From: Andrzej Hajda <andrzej.hajda@intel.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Jani Nikula <jani.nikula@linux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Matthew Auld <matthew.auld@intel.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org, kernel-janitors@vger.kernel.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Fix an error handling path in igt_write_huge()
Date: Tue, 18 Jul 2023 14:10:45 +0200 [thread overview]
Message-ID: <e1dafe04-0375-08a0-dca0-707d68ea5bd5@intel.com> (raw)
In-Reply-To: <7a036b88671312ee9adc01c74ef5b3376f690b76.1689619758.git.christophe.jaillet@wanadoo.fr>
On 17.07.2023 20:49, Christophe JAILLET wrote:
> All error handling paths go to 'out', except this one. Be consistent and
> also branch to 'out' here.
>
> Fixes: c10a652e239e ("drm/i915/selftests: Rework context handling in hugepages selftests")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
For me seems correct.
Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com>
Regards
Andrzej
> ---
> /!\ Speculative /!\
>
> This patch is based on analysis of the surrounding code and should be
> reviewed with care !
>
> If the patch is wrong, maybe a comment in the code could explain why.
>
> /!\ Speculative /!\
> ---
> drivers/gpu/drm/i915/gem/selftests/huge_pages.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
> index df6c9a84252c..6b9f6cf50bf6 100644
> --- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
> +++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c
> @@ -1246,8 +1246,10 @@ static int igt_write_huge(struct drm_i915_private *i915,
> * times in succession a possibility by enlarging the permutation array.
> */
> order = i915_random_order(count * count, &prng);
> - if (!order)
> - return -ENOMEM;
> + if (!order) {
> + err = -ENOMEM;
> + goto out;
> + }
>
> max_page_size = rounddown_pow_of_two(obj->mm.page_sizes.sg);
> max = div_u64(max - size, max_page_size);
next prev parent reply other threads:[~2023-07-18 12:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-17 18:49 [PATCH] drm/i915: Fix an error handling path in igt_write_huge() Christophe JAILLET
2023-07-18 12:10 ` Andrzej Hajda [this message]
2023-07-24 16:24 ` [Intel-gfx] " Andi Shyti
2023-07-24 16:44 ` Andi Shyti
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=e1dafe04-0375-08a0-dca0-707d68ea5bd5@intel.com \
--to=andrzej.hajda@intel.com \
--cc=airlied@gmail.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthew.auld@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=tvrtko.ursulin@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox