All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] drm/vmwgfx: Remove set but not used variable 'file_priv'
@ 2018-10-05 11:36 ` YueHaibing
  0 siblings, 0 replies; 20+ messages in thread
From: YueHaibing @ 2018-10-05 11:36 UTC (permalink / raw)
  To: VMware Graphics, Sinclair Yeh, Thomas Hellstrom, David Airlie
  Cc: YueHaibing, dri-devel, linux-kernel, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/vmwgfx/vmwgfx_fence.c: In function 'vmw_event_fence_action_seq_passed':
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c:909:19: warning:
 variable 'file_priv' set but not used [-Wunused-but-set-variable]
  struct drm_file *file_priv;
  
It not used any more since 
commit fb740cf2492c ("drm: Create drm_send_event helpers")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
index f872615..301260e 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
@@ -906,13 +906,10 @@ static void vmw_event_fence_action_seq_passed(struct vmw_fence_action *action)
 		container_of(action, struct vmw_event_fence_action, action);
 	struct drm_device *dev = eaction->dev;
 	struct drm_pending_event *event = eaction->event;
-	struct drm_file *file_priv;
-
 
 	if (unlikely(event == NULL))
 		return;
 
-	file_priv = event->file_priv;
 	spin_lock_irq(&dev->event_lock);
 
 	if (likely(eaction->tv_sec != NULL)) {




^ permalink raw reply related	[flat|nested] 20+ messages in thread
* [PATCH -next] drm/vmwgfx: Remove set but not used variable 'fb_offset, fb_depth'
  2018-10-05 11:36 ` YueHaibing
  (?)
@ 2019-03-23  2:46 ` YueHaibing
  -1 siblings, 0 replies; 20+ messages in thread
From: YueHaibing @ 2019-03-23  2:46 UTC (permalink / raw)
  To: VMware Graphics, Thomas Hellstrom, David Airlie, Daniel Vetter
  Cc: YueHaibing, dri-devel, linux-kernel, kernel-janitors

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>
---
 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)




^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2019-03-27 14:11 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2019-03-27 14:11   ` Mukesh Ojha

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.