mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Jason Yan <yanaijie@huawei.com>
Cc: airlied@linux.ie, daniel@ffwll.ch,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Hulk Robot <hulkci@huawei.com>
Subject: Re: [PATCH] drm/i810: make i810_flush_queue() return void
Date: Fri, 11 Sep 2020 10:54:32 +0200	[thread overview]
Message-ID: <20200911085432.GQ438822@phenom.ffwll.local> (raw)
In-Reply-To: <20200910140610.1191578-1-yanaijie@huawei.com>

On Thu, Sep 10, 2020 at 10:06:10PM +0800, Jason Yan wrote:
> This function always return '0' and no callers use the return value. So
> make it a void function.
> 
> This eliminates the following coccicheck warning:
> 
> drivers/gpu/drm/i810/i810_dma.c:860:8-11: Unneeded variable: "ret".
> Return "0" on line 885
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Jason Yan <yanaijie@huawei.com>

Queued up for 5.10 in drm-misc-next, thanks for your patch.
-Daniel

> ---
>  drivers/gpu/drm/i810/i810_dma.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c
> index 303c2d483c6e..88250860f8e4 100644
> --- a/drivers/gpu/drm/i810/i810_dma.c
> +++ b/drivers/gpu/drm/i810/i810_dma.c
> @@ -853,11 +853,11 @@ static void i810_dma_quiescent(struct drm_device *dev)
>  	i810_wait_ring(dev, dev_priv->ring.Size - 8);
>  }
>  
> -static int i810_flush_queue(struct drm_device *dev)
> +static void i810_flush_queue(struct drm_device *dev)
>  {
>  	drm_i810_private_t *dev_priv = dev->dev_private;
>  	struct drm_device_dma *dma = dev->dma;
> -	int i, ret = 0;
> +	int i;
>  	RING_LOCALS;
>  
>  	i810_kernel_lost_context(dev);
> @@ -882,7 +882,7 @@ static int i810_flush_queue(struct drm_device *dev)
>  			DRM_DEBUG("still on client\n");
>  	}
>  
> -	return ret;
> +	return;
>  }
>  
>  /* Must be called with the lock held */
> -- 
> 2.25.4
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

      reply	other threads:[~2020-09-11  8:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10 14:06 Jason Yan
2020-09-11  8:54 ` Daniel Vetter [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=20200911085432.GQ438822@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hulkci@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yanaijie@huawei.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®