* [PATCH -next] drm/vmwgfx: Remove set but not used variable 'file_priv'
@ 2018-10-05 11:36 YueHaibing
2018-10-05 22:01 ` Sinclair Yeh
0 siblings, 1 reply; 2+ 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] 2+ messages in thread
* Re: [PATCH -next] drm/vmwgfx: Remove set but not used variable 'file_priv'
2018-10-05 11:36 [PATCH -next] drm/vmwgfx: Remove set but not used variable 'file_priv' YueHaibing
@ 2018-10-05 22:01 ` Sinclair Yeh
0 siblings, 0 replies; 2+ messages in thread
From: Sinclair Yeh @ 2018-10-05 22:01 UTC (permalink / raw)
To: YueHaibing
Cc: linux-graphics-maintainer, Thomas Hellstrom, David Airlie,
dri-devel, linux-kernel, kernel-janitors
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
On Fri, Oct 05, 2018 at 11:36:58AM +0000, YueHaibing wrote:
> 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 [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-05 22:01 UTC | newest]
Thread overview: 2+ 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 22:01 ` Sinclair Yeh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).