From: Nirmoy Das <nirmoy.das@intel.com>
To: Matthew Auld <matthew.auld@intel.com>, <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH] drm/xe/vm: fix xe_assert()
Date: Mon, 18 Mar 2024 12:04:45 +0100 [thread overview]
Message-ID: <77d641ad-bf82-4018-8e26-e4d48550f5a4@intel.com> (raw)
In-Reply-To: <20240318103616.26240-2-matthew.auld@intel.com>
[-- Attachment #1: Type: text/plain, Size: 1016 bytes --]
On 3/18/2024 11:36 AM, Matthew Auld wrote:
> The region can be used an index into the region_to_mem_type, so we
> should be asserting that it is less than the ARRAY_SIZE here.
>
> Signed-off-by: Matthew Auld<matthew.auld@intel.com>
> Cc: Nirmoy Das<nirmoy.das@intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
> ---
> drivers/gpu/drm/xe/xe_vm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> index cbb9b8935c90..51d62323d9ee 100644
> --- a/drivers/gpu/drm/xe/xe_vm.c
> +++ b/drivers/gpu/drm/xe/xe_vm.c
> @@ -2033,7 +2033,7 @@ static int xe_vm_prefetch(struct xe_vm *vm, struct xe_vma *vma,
> struct xe_exec_queue *wait_exec_queue = to_wait_exec_queue(vm, q);
> int err;
>
> - xe_assert(vm->xe, region <= ARRAY_SIZE(region_to_mem_type));
> + xe_assert(vm->xe, region < ARRAY_SIZE(region_to_mem_type));
>
> if (!xe_vma_has_no_bo(vma)) {
> err = xe_bo_migrate(xe_vma_bo(vma), region_to_mem_type[region]);
[-- Attachment #2: Type: text/html, Size: 1775 bytes --]
next prev parent reply other threads:[~2024-03-18 11:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-18 10:36 [PATCH] drm/xe/vm: fix xe_assert() Matthew Auld
2024-03-18 11:04 ` Nirmoy Das [this message]
2024-03-18 17:25 ` ✓ CI.Patch_applied: success for " Patchwork
2024-03-18 17:26 ` ✓ CI.checkpatch: " Patchwork
2024-03-18 17:26 ` ✓ CI.KUnit: " Patchwork
2024-03-18 17:38 ` ✓ CI.Build: " Patchwork
2024-03-18 17:43 ` ✓ CI.Hooks: " Patchwork
2024-03-18 17:44 ` ✓ CI.checksparse: " Patchwork
2024-03-18 18:17 ` ✓ CI.BAT: " 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=77d641ad-bf82-4018-8e26-e4d48550f5a4@intel.com \
--to=nirmoy.das@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.auld@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