All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Thorsten Blum <thorsten.blum@toblux.com>
Cc: lucas.demarchi@intel.com, thomas.hellstrom@linux.intel.com,
	rodrigo.vivi@intel.com,  maarten.lankhorst@linux.intel.com,
	mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com,
	daniel@ffwll.ch, intel-xe@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [RESEND PATCH] drm/xe/oa: Use vma_pages() helper function in xe_oa_mmap()
Date: Mon, 19 Aug 2024 07:28:45 -0700	[thread overview]
Message-ID: <87le0s8u3m.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20240819095751.539645-2-thorsten.blum@toblux.com>

On Mon, 19 Aug 2024 02:57:52 -0700, Thorsten Blum wrote:
>
> Use the vma_pages() helper function and remove the following
> Coccinelle/coccicheck warning reported by vma_pages.cocci:
>
>   WARNING: Consider using vma_pages helper on vma
>
> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com>

Sorry Thorsten, looks like we forgot to merge it last time. I have merged
this just now. Thanks for the patch.

> ---
>  drivers/gpu/drm/xe/xe_oa.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c
> index 6d69f751bf78..133292a9d687 100644
> --- a/drivers/gpu/drm/xe/xe_oa.c
> +++ b/drivers/gpu/drm/xe/xe_oa.c
> @@ -1244,8 +1244,7 @@ static int xe_oa_mmap(struct file *file, struct vm_area_struct *vma)
>	vm_flags_mod(vma, VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP | VM_DONTCOPY,
>		     VM_MAYWRITE | VM_MAYEXEC);
>
> -	xe_assert(stream->oa->xe, bo->ttm.ttm->num_pages ==
> -		  (vma->vm_end - vma->vm_start) >> PAGE_SHIFT);
> +	xe_assert(stream->oa->xe, bo->ttm.ttm->num_pages == vma_pages(vma));
>	for (i = 0; i < bo->ttm.ttm->num_pages; i++) {
>		ret = remap_pfn_range(vma, start, page_to_pfn(bo->ttm.ttm->pages[i]),
>				      PAGE_SIZE, vma->vm_page_prot);
> --
> 2.46.0
>

  parent reply	other threads:[~2024-08-19 14:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-19  9:57 [RESEND PATCH] drm/xe/oa: Use vma_pages() helper function in xe_oa_mmap() Thorsten Blum
2024-08-19 14:15 ` ✓ CI.Patch_applied: success for drm/xe/oa: Use vma_pages() helper function in xe_oa_mmap() (rev2) Patchwork
2024-08-19 14:15 ` ✓ CI.checkpatch: " Patchwork
2024-08-19 14:16 ` ✓ CI.KUnit: " Patchwork
2024-08-19 14:28 ` Dixit, Ashutosh [this message]
2024-08-19 14:29 ` ✓ CI.Build: " Patchwork
2024-08-19 14:32 ` ✓ CI.Hooks: " Patchwork
2024-08-19 14:35 ` ✓ CI.checksparse: " Patchwork
2024-08-19 14:55 ` ✓ CI.BAT: " Patchwork
2024-08-19 17:11 ` ✓ CI.FULL: " 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=87le0s8u3m.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucas.demarchi@intel.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=rodrigo.vivi@intel.com \
    --cc=thomas.hellstrom@linux.intel.com \
    --cc=thorsten.blum@toblux.com \
    --cc=tzimmermann@suse.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.