From: "Christian König" <christian.koenig@amd.com>
To: Jesse Zhang <jesse.zhang@amd.com>, igt-dev@lists.freedesktop.org
Cc: Alex Deucher <alexander.deucher@amd.com>
Subject: Re: [PATCH i-g-t] tests/amdgpu:fix vm test issue
Date: Fri, 5 Jan 2024 10:43:33 +0100 [thread overview]
Message-ID: <0bc50215-ecb2-4e10-8b00-e239e3ffe840@amd.com> (raw)
In-Reply-To: <20240105051828.3679085-1-jesse.zhang@amd.com>
Am 05.01.24 um 06:18 schrieb Jesse Zhang:
> Initialize the variable "r" before using it.
>
> Cc: Vitaly Prosyak <vitaly.prosyak@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Christian Koenig <christian.koenig@amd.com>
> Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
>
> Signed-off-by: Jesse Zhang <Jesse.Zhang@amd.com>
> ---
> tests/amdgpu/amd_vm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/tests/amdgpu/amd_vm.c b/tests/amdgpu/amd_vm.c
> index dab91f291..bb7b6f173 100644
> --- a/tests/amdgpu/amd_vm.c
> +++ b/tests/amdgpu/amd_vm.c
> @@ -127,7 +127,8 @@ amdgpu_vm_unaligned_map(amdgpu_device_handle device_handle)
> request.preferred_heap = AMDGPU_GEM_DOMAIN_VRAM;
> request.flags = AMDGPU_GEM_CREATE_NO_CPU_ACCESS;
>
> - if (-ENOMEM == amdgpu_bo_alloc(device_handle, &request, &buf_handle)) {
> + r = amdgpu_bo_alloc(device_handle, &request, &buf_handle);
> + if (-ENOMEM == r) {
For the kernel it's usually preferred to write "r == -ENOMEM", but could
be that it's just the other way around here. Not sure what coding style
the IGT tests prefer.
Either way Acked-by: Christian König <christian.koenig@amd.com>.
Regards,
Christian.
> /* Try allocate on the device of small memory */
> request.alloc_size = 8ULL << 20;
> map_size = (8ULL << 20) - (2 << 12);
next prev parent reply other threads:[~2024-01-05 9:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-05 5:18 [PATCH i-g-t] tests/amdgpu:fix vm test issue Jesse Zhang
2024-01-05 5:18 ` Jesse Zhang
2024-01-05 6:23 ` ✓ Fi.CI.BAT: success for " Patchwork
2024-01-05 6:56 ` ✓ CI.xeBAT: " Patchwork
2024-01-05 7:40 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-01-05 9:42 ` [PATCH i-g-t] " Kamil Konieczny
2024-01-05 9:43 ` Christian König [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-12-14 9:07 [PATCH i-g-t] tests/amdgpu: fix VM " Jesse Zhang
2023-12-14 9:53 ` Christian König
2023-12-15 1:43 ` Zhang, Jesse(Jie)
2023-12-15 9:28 ` Christian König
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=0bc50215-ecb2-4e10-8b00-e239e3ffe840@amd.com \
--to=christian.koenig@amd.com \
--cc=alexander.deucher@amd.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jesse.zhang@amd.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