diff options
author | Arnd Bergmann <[email protected]> | 2016-10-18 00:13:39 +0200 |
---|---|---|
committer | Daniel Vetter <[email protected]> | 2016-10-18 09:45:17 +0200 |
commit | cff52e5fc4cfc978b7df898dc14a0492c7ef0ae8 (patch) | |
tree | fd16fb42a9d3e98483b65b14d6f127d47d1a66c0 /tools/perf/scripts/python/syscall-counts.py | |
parent | 9edbf1fa600a2ef17c7553c2103d0055d0320d15 (diff) |
drm: avoid uninitialized timestamp use in wait_vblank
gcc warns about the timestamp in drm_wait_vblank being possibly
used without an initialization:
drivers/gpu/drm/drm_irq.c: In function 'drm_crtc_send_vblank_event':
drivers/gpu/drm/drm_irq.c:992:24: error: 'now.tv_usec' may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/gpu/drm/drm_irq.c:1069:17: note: 'now.tv_usec' was declared here
drivers/gpu/drm/drm_irq.c:991:23: error: 'now.tv_sec' may be used uninitialized in this function [-Werror=maybe-uninitialized]
This can happen if drm_vblank_count_and_time() returns 0 in its
error path. To sanitize the error case, I'm changing that function
to return a zero timestamp when it fails.
Fixes: e6ae8687a87b ("drm: idiot-proof vblank")
Reviewed-by: David Herrmann <[email protected]>
Cc: Rob Clark <[email protected]>
Cc: Daniel Vetter <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: Mario Kleiner <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions