mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank Binns <Frank.Binns@imgtec.com>
To: "tzimmermann@suse.de" <tzimmermann@suse.de>,
	Matt Coster <Matt.Coster@imgtec.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	"airlied@gmail.com" <airlied@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"maarten.lankhorst@linux.intel.com"
	<maarten.lankhorst@linux.intel.com>,
	"daniel@ffwll.ch" <daniel@ffwll.ch>,
	"mripard@kernel.org" <mripard@kernel.org>
Subject: Re: [PATCH] drm/imagination: Use pvr_vm_context_get()
Date: Fri, 30 Aug 2024 13:59:11 +0000	[thread overview]
Message-ID: <6cdb2df38ca349b5a10cc6583701876255e5f995.camel@imgtec.com> (raw)
In-Reply-To: <72fa30a5-ddbf-4957-ad5c-5c941747be5c@imgtec.com>

On Wed, 2024-08-28 at 13:09 +0000, Matt Coster wrote:
> I missed this open-coded kref_get() while trying to debug a refcount
> bug, so let's use the helper function here to avoid that waste of time
> again in the future.
> 

Reviewed-by: Frank Binns <frank.binns@imgtec.com>

> Signed-off-by: Matt Coster <matt.coster@imgtec.com>
> Fixes: ff5f643de0bf ("drm/imagination: Add GEM and VM related code")
> ---
>   drivers/gpu/drm/imagination/pvr_vm.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/imagination/pvr_vm.c 
> b/drivers/gpu/drm/imagination/pvr_vm.c
> index e59517ba039e..ffd466509d0b 100644
> --- a/drivers/gpu/drm/imagination/pvr_vm.c
> +++ b/drivers/gpu/drm/imagination/pvr_vm.c
> @@ -636,9 +636,7 @@ pvr_vm_context_lookup(struct pvr_file *pvr_file, u32 
> handle)
>    	xa_lock(&pvr_file->vm_ctx_handles);
>   	vm_ctx = xa_load(&pvr_file->vm_ctx_handles, handle);
> -	if (vm_ctx)
> -		kref_get(&vm_ctx->ref_count);
> -
> +	pvr_vm_context_get(vm_ctx);
>   	xa_unlock(&pvr_file->vm_ctx_handles);
>    	return vm_ctx;
> -- 
> 2.46.0
> 
> 

  reply	other threads:[~2024-08-30 13:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-28 13:09 Matt Coster
2024-08-30 13:59 ` Frank Binns [this message]
2024-08-30 15:06 ` [PATCH RESEND] " Matt Coster
2024-09-02  7:57   ` Frank Binns

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=6cdb2df38ca349b5a10cc6583701876255e5f995.camel@imgtec.com \
    --to=frank.binns@imgtec.com \
    --cc=Matt.Coster@imgtec.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --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 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®