All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Rob Clark" <robin.clark@oss.qualcomm.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 4/6] drm/msm/gem: Stop exposing a page array
Date: Sat, 26 Sep 2026 18:40:22 +0000	[thread overview]
Message-ID: <20260926184022.D27D31F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260926183051.25754-5-robin.clark@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] msm: dead code return ret; in msm_gem_prime_pin()
--

commit bed87911e0269b42805b7cb336b30be286c9a63a
Author: Rob Clark <robin.clark@oss.qualcomm.com>

drm/msm/gem: Stop exposing a page array

This commit converts the remaining callers of msm_gem_pin_pages_locked() and 
msm_gem_get_pages_locked() to directly return an int instead of returning a 
page array. It also renames msm_gem_get_pages_locked() to 
msm_gem_make_resident_locked() to better reflect its purpose.

> diff --git a/drivers/gpu/drm/msm/msm_gem_prime.c b/drivers/gpu/drm/msm/msm_gem_prime.c
> index beb7f22fd6948..b14cda87df4fd 100644
> --- a/drivers/gpu/drm/msm/msm_gem_prime.c
> +++ b/drivers/gpu/drm/msm/msm_gem_prime.c
> @@ -109,7 +109,6 @@ struct dma_buf *msm_gem_prime_export(struct drm_gem_object *obj, int flags)
>  
>  int msm_gem_prime_pin(struct drm_gem_object *obj)
>  {
> -	struct page **pages;
>  	int ret = 0;
>  
>  	if (drm_gem_is_imported(obj))
> @@ -118,9 +117,7 @@ int msm_gem_prime_pin(struct drm_gem_object *obj)
>  	if (to_msm_bo(obj)->flags & MSM_BO_NO_SHARE)
>  		return -EINVAL;
>  
> -	pages = msm_gem_pin_pages_locked(obj);
> -	if (IS_ERR(pages))
> -		ret = PTR_ERR(pages);
> +	return msm_gem_pin_pages_locked(obj);
>  
>  	return ret;

[Severity: Low]
Is this return ret statement now completely unreachable? 

With the direct return of msm_gem_pin_pages_locked() added just above it, 
this looks like it might be dead code left over from the refactoring. Can this 
be safely removed?

>  }
>

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260926183051.25754-1-robin.clark@oss.qualcomm.com?part=4

  reply	other threads:[~2026-09-26 18:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-26 18:30 [PATCH 0/6] drm/msm/gem: Drop use of pages for imported dma-bufs Rob Clark
2026-09-26 18:30 ` [PATCH 1/6] drm/msm/gem: Add helper to check if resident Rob Clark
2026-09-26 18:30 ` [PATCH 2/6] drm/msm/gem: Mmap imported dma-bufs via the exporter Rob Clark
2026-09-28  8:37   ` Christian König
2026-09-26 18:30 ` [PATCH 3/6] drm/msm/gem: Use get_pages() directly in vmap path Rob Clark
2026-09-26 18:30 ` [PATCH 4/6] drm/msm/gem: Stop exposing a page array Rob Clark
2026-09-26 18:40   ` sashiko-bot [this message]
2026-09-26 18:30 ` [PATCH 5/6] drm/msm/gem: Stop calling get_pages() for imported dma-bufs Rob Clark
2026-09-26 18:43   ` sashiko-bot
2026-09-26 18:30 ` [PATCH 6/6] drm/msm/gem: Drop use of drm_prime_sg_to_page_array() Rob Clark

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=20260926184022.D27D31F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=robin.clark@oss.qualcomm.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.