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 <[email protected]>
> ---
>  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 via email to