mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Aryan Sinha <sinha.aryan03@gmail.com>
Cc: "Matthew Brost" <matthew.brost@intel.com>,
	"Thomas Hellström" <thomas.hellstrom@linux.intel.com>,
	"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
Subject: Re: [PATCH] drm/xe: use resource_size() in xe_pagemap_create()
Date: Thu, 1 Oct 2026 16:44:04 -0400	[thread overview]
Message-ID: <ar7GFPJa3suzkPGl@intel.com> (raw)
In-Reply-To: <20261001163328.51556-1-sinha.aryan03@gmail.com>

On Thu, Oct 01, 2026 at 10:03:22PM +0530, Aryan Sinha wrote:
> The open coded res->end - res->start + 1 is what resource_size() does.

nit: we should use imperative telling the change and why. this is just the why...

> 
> 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);

I noticed we are not including the linux/ioport.h here.
We should do this explicit. I know, we should had done it already when using the
struct resource. But now it makes more important. Please add it.

Thanks for the contribution,
Rodrigo.

> +	devm_release_mem_region(dev, res->start, resource_size(res));
>  out_err:
>  	drm_pagemap_put(dpagemap);
>  	return ERR_PTR(err);
> -- 
> 2.46.0
> 

      reply	other threads:[~2026-10-01 20:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-01 16:33 Aryan Sinha
2026-10-01 20:44 ` Rodrigo Vivi [this message]

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=ar7GFPJa3suzkPGl@intel.com \
    --to=rodrigo.vivi@intel.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=simona@ffwll.ch \
    --cc=sinha.aryan03@gmail.com \
    --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®