From: Mukesh Ojha <mojha@codeaurora.org>
To: YueHaibing <yuehaibing@huawei.com>,
VMware Graphics <linux-graphics-maintainer@vmware.com>,
Thomas Hellstrom <thellstrom@vmware.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH -next] drm/vmwgfx: Remove set but not used variable 'fb_offset, fb_depth'
Date: Wed, 27 Mar 2019 14:11:33 +0000 [thread overview]
Message-ID: <171dc8ca-00ff-da5c-c607-89f25dcd0a06@codeaurora.org> (raw)
In-Reply-To: <20190323024606.163683-1-yuehaibing@huawei.com>
On 3/23/2019 8:16 AM, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/gpu/drm/vmwgfx/vmwgfx_fb.c: In function 'vmw_fb_init':
> drivers/gpu/drm/vmwgfx/vmwgfx_fb.c:645:29: warning:
> variable 'fb_offset' set but not used [-Wunused-but-set-variable]
>
> drivers/gpu/drm/vmwgfx/vmwgfx_fb.c:645:19: warning:
> variable 'fb_depth' set but not used [-Wunused-but-set-variable]
>
> They're not used any more, so can be removed.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
-Mukesh
> ---
> drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> index 2a9112515f46..86efb91f5034 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> @@ -642,12 +642,11 @@ int vmw_fb_init(struct vmw_private *vmw_priv)
> struct vmw_fb_par *par;
> struct fb_info *info;
> unsigned fb_width, fb_height;
> - unsigned fb_bpp, fb_depth, fb_offset, fb_pitch, fb_size;
> + unsigned fb_bpp, fb_pitch, fb_size;
> struct drm_display_mode *init_mode;
> int ret;
>
> fb_bpp = 32;
> - fb_depth = 24;
>
> /* XXX As shouldn't these be as well. */
> fb_width = min(vmw_priv->fb_max_width, (unsigned)2048);
> @@ -655,7 +654,6 @@ int vmw_fb_init(struct vmw_private *vmw_priv)
>
> fb_pitch = fb_width * fb_bpp / 8;
> fb_size = fb_pitch * fb_height;
> - fb_offset = vmw_read(vmw_priv, SVGA_REG_FB_OFFSET);
>
> info = framebuffer_alloc(sizeof(*par), device);
> if (!info)
>
>
>
WARNING: multiple messages have this Message-ID (diff)
From: Mukesh Ojha <mojha@codeaurora.org>
To: YueHaibing <yuehaibing@huawei.com>,
VMware Graphics <linux-graphics-maintainer@vmware.com>,
Thomas Hellstrom <thellstrom@vmware.com>,
David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH -next] drm/vmwgfx: Remove set but not used variable 'fb_offset, fb_depth'
Date: Wed, 27 Mar 2019 19:29:33 +0530 [thread overview]
Message-ID: <171dc8ca-00ff-da5c-c607-89f25dcd0a06@codeaurora.org> (raw)
In-Reply-To: <20190323024606.163683-1-yuehaibing@huawei.com>
On 3/23/2019 8:16 AM, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/gpu/drm/vmwgfx/vmwgfx_fb.c: In function 'vmw_fb_init':
> drivers/gpu/drm/vmwgfx/vmwgfx_fb.c:645:29: warning:
> variable 'fb_offset' set but not used [-Wunused-but-set-variable]
>
> drivers/gpu/drm/vmwgfx/vmwgfx_fb.c:645:19: warning:
> variable 'fb_depth' set but not used [-Wunused-but-set-variable]
>
> They're not used any more, so can be removed.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
-Mukesh
> ---
> drivers/gpu/drm/vmwgfx/vmwgfx_fb.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> index 2a9112515f46..86efb91f5034 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fb.c
> @@ -642,12 +642,11 @@ int vmw_fb_init(struct vmw_private *vmw_priv)
> struct vmw_fb_par *par;
> struct fb_info *info;
> unsigned fb_width, fb_height;
> - unsigned fb_bpp, fb_depth, fb_offset, fb_pitch, fb_size;
> + unsigned fb_bpp, fb_pitch, fb_size;
> struct drm_display_mode *init_mode;
> int ret;
>
> fb_bpp = 32;
> - fb_depth = 24;
>
> /* XXX As shouldn't these be as well. */
> fb_width = min(vmw_priv->fb_max_width, (unsigned)2048);
> @@ -655,7 +654,6 @@ int vmw_fb_init(struct vmw_private *vmw_priv)
>
> fb_pitch = fb_width * fb_bpp / 8;
> fb_size = fb_pitch * fb_height;
> - fb_offset = vmw_read(vmw_priv, SVGA_REG_FB_OFFSET);
>
> info = framebuffer_alloc(sizeof(*par), device);
> if (!info)
>
>
>
next prev parent reply other threads:[~2019-03-27 14:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-05 11:36 [PATCH -next] drm/vmwgfx: Remove set but not used variable 'file_priv' YueHaibing
2018-10-05 11:36 ` YueHaibing
2018-10-05 11:36 ` YueHaibing
2018-10-05 22:01 ` Sinclair Yeh
2018-10-05 22:01 ` Sinclair Yeh
2018-10-05 22:01 ` Sinclair Yeh
2019-02-14 1:54 ` [PATCH -next] drm/vmwgfx: Remove set but not used variable 'restart' YueHaibing
2019-02-14 2:08 ` YueHaibing
2019-02-14 2:08 ` YueHaibing
2019-02-14 19:58 ` Deepak Singh Rawat
2019-02-14 19:58 ` Deepak Singh Rawat
2019-02-14 19:58 ` Deepak Singh Rawat
2019-03-23 2:46 ` [PATCH -next] drm/vmwgfx: Remove set but not used variable 'fb_offset, fb_depth' YueHaibing
2019-03-23 2:46 ` YueHaibing
2019-03-23 2:46 ` YueHaibing
2019-03-25 17:26 ` Deepak Singh Rawat
2019-03-25 17:26 ` Deepak Singh Rawat
2019-03-26 6:54 ` Mukesh Ojha
2019-03-27 13:59 ` Mukesh Ojha [this message]
2019-03-27 14:11 ` Mukesh Ojha
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=171dc8ca-00ff-da5c-c607-89f25dcd0a06@codeaurora.org \
--to=mojha@codeaurora.org \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-graphics-maintainer@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=thellstrom@vmware.com \
--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 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.