From: Aryan Sinha <sinha.aryan03@gmail.com>
To: "Matthew Brost" <matthew.brost@intel.com>,
"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
"Rodrigo Vivi" <rodrigo.vivi@intel.com>
Cc: David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org,
Aryan Sinha <sinha.aryan03@gmail.com>
Subject: [PATCH] drm/xe: use resource_size() in xe_pagemap_create()
Date: Thu, 1 Oct 2026 22:03:22 +0530 [thread overview]
Message-ID: <20261001163328.51556-1-sinha.aryan03@gmail.com> (raw)
The open coded res->end - res->start + 1 is what resource_size() does.
Signed-off-by: Aryan Sinha <sinha.aryan03@gmail.com>
---
drivers/gpu/drm/xe/xe_svm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/xe_svm.c b/drivers/gpu/drm/xe/xe_svm.c
index b228a737c..e6ab5a5b3 100644
--- a/drivers/gpu/drm/xe/xe_svm.c
+++ b/drivers/gpu/drm/xe/xe_svm.c
@@ -1848,7 +1848,7 @@ static struct xe_pagemap *xe_pagemap_create(struct xe_device *xe, struct xe_vram
out_no_pages:
drm_pagemap_release_owner(&xpagemap->peer);
out_no_owner:
- devm_release_mem_region(dev, res->start, res->end - res->start + 1);
+ devm_release_mem_region(dev, res->start, resource_size(res));
out_err:
drm_pagemap_put(dpagemap);
return ERR_PTR(err);
--
2.46.0
next reply other threads:[~2026-10-01 16:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-01 16:33 Aryan Sinha [this message]
2026-10-01 20:44 ` Rodrigo Vivi
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=20261001163328.51556-1-sinha.aryan03@gmail.com \
--to=sinha.aryan03@gmail.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matthew.brost@intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=simona@ffwll.ch \
--cc=thomas.hellstrom@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
all inboxes | Powered by JetHome®