mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: YueHaibing <yuehaibing@huawei.com>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>,
	Sam Ravnborg <sam@ravnborg.org>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
	dri-devel@lists.freedesktop.org, Hulk Robot <hulkci@huawei.com>
Subject: Re: [PATCH -next] drm/mga: remove set but not used variable 'buf_priv'
Date: Wed, 24 Jul 2019 09:40:25 +0200	[thread overview]
Message-ID: <14af485d-a73f-d6bc-a93b-8d44bb64112a@suse.de> (raw)
In-Reply-To: <20190724014619.32665-1-yuehaibing@huawei.com>


[-- Attachment #1.1: Type: text/plain, Size: 1807 bytes --]

Am 24.07.19 um 03:46 schrieb YueHaibing:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/gpu/drm/mga/mga_state.c: In function 'mga_dma_iload':
> drivers/gpu/drm/mga/mga_state.c:945:22: warning:
>  variable 'buf_priv' set but not used [-Wunused-but-set-variable]
> 
> It is never used, so can be removed.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/gpu/drm/mga/mga_state.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/mga/mga_state.c b/drivers/gpu/drm/mga/mga_state.c
> index 77a0b006f066..0dec4062e5a2 100644
> --- a/drivers/gpu/drm/mga/mga_state.c
> +++ b/drivers/gpu/drm/mga/mga_state.c
> @@ -942,7 +942,6 @@ static int mga_dma_iload(struct drm_device *dev, void *data, struct drm_file *fi
>  	struct drm_device_dma *dma = dev->dma;
>  	drm_mga_private_t *dev_priv = dev->dev_private;
>  	struct drm_buf *buf;
> -	drm_mga_buf_priv_t *buf_priv;
>  	drm_mga_iload_t *iload = data;
>  	DRM_DEBUG("\n");
>  
> @@ -959,7 +958,6 @@ static int mga_dma_iload(struct drm_device *dev, void *data, struct drm_file *fi
>  		return -EINVAL;
>  
>  	buf = dma->buflist[iload->idx];
> -	buf_priv = buf->dev_private;
>  
>  	if (mga_verify_iload(dev_priv, iload->dstorg, iload->length)) {
>  		mga_freelist_put(dev, buf);
> 

Thanks!

Acked-by: Thomas Zimmermann <tzimmermann@suse.de>

> 
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Linux GmbH, Maxfeldstrasse 5, 90409 Nuernberg, Germany
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2019-07-24  7:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-24  1:46 YueHaibing
2019-07-24  7:40 ` Thomas Zimmermann [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=14af485d-a73f-d6bc-a93b-8d44bb64112a@suse.de \
    --to=tzimmermann@suse.de \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hulkci@huawei.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.org \
    --cc=yuehaibing@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®