From 886016190c804743da83f9e0db3366fef9720d0a Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Tue, 14 Mar 2017 17:29:06 -0700 Subject: gpu: nvgpu: Fix timers failure address In the timers code a macro was using __builtin_return_address(0) when it should have been using _THIS_IP_. __builtin_return_address(0) will cause the timers code to print the return address of the function that calls the timers code. This isn't actually useful, of course. A user actually cares about where the timers code call comes from which is easily obtained with _THIS_IP_. Bug 1799159 Change-Id: Iac16bc79e89e4cd18133db3d20f5a50d4d5e8f31 Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1320839 Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/include/nvgpu/timers.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/include/nvgpu/timers.h b/drivers/gpu/nvgpu/include/nvgpu/timers.h index 0ecbc183..abf8b736 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/timers.h +++ b/drivers/gpu/nvgpu/include/nvgpu/timers.h @@ -77,13 +77,11 @@ int nvgpu_timeout_init(struct gk20a *g, struct nvgpu_timeout *timeout, int nvgpu_timeout_peek_expired(struct nvgpu_timeout *timeout); #define nvgpu_timeout_expired(__timeout) \ - __nvgpu_timeout_expired_msg(__timeout, \ - __builtin_return_address(0), "") + __nvgpu_timeout_expired_msg(__timeout, (void *)_THIS_IP_, "") #define nvgpu_timeout_expired_msg(__timeout, fmt, args...) \ - __nvgpu_timeout_expired_msg(__timeout, \ - __builtin_return_address(0), \ - fmt, ##args) + __nvgpu_timeout_expired_msg(__timeout, (void *)_THIS_IP_, \ + fmt, ##args) /* * Don't use this directly. -- cgit v1.2.2